static void Main(string[] args) { Vehiculo v = new Vehiculo(20); v.Acelerar(); v.Contacto(); v.Acelerar(); v.Acelerar(); v.Acelerar(); v.Frenar(); v.Frenar(); v.Frenar(); v.Frenar(); }
public static void Main(string[] args) { //Application.Init (); //MainWindow win = new MainWindow (); //win.Show (); //Application.Run (); Vehiculo v = new Vehiculo(20); v.Acelerar(); v.Contacto(); v.Acelerar(); v.Acelerar(); v.Acelerar(); v.Frenar(); v.Frenar(); v.Frenar(); v.Frenar(); Console.Read (); }
static void Main(string[] args) { // Concept var context = new Context(new ConcreteStateA()); context.Request1(); context.Request2(); //Exercise 1 var vehiculo = new Vehiculo(20, new ApagadoState()); vehiculo.Acelerar(); vehiculo.Contacto(); vehiculo.Acelerar(); vehiculo.Acelerar(); vehiculo.Acelerar(); vehiculo.Frenar(); vehiculo.Frenar(); vehiculo.Frenar(); vehiculo.Frenar(); }