Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            VehicleFactory factory = new ConcreteVehicleFactory();

            IFactory scooter = factory.GetVehicle("Scooter");

            scooter.Drive(10);

            IFactory bike = factory.GetVehicle("Bike");

            bike.Drive(20);

            Console.ReadKey();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            VehicleFactory vehicle = new ConcreteVehicleFactory();

            IFactory bike = vehicle.GetVehicle("Bike");

            bike.Drive(12);

            IFactory skateboard = vehicle.GetVehicle("Skateboard");

            skateboard.Drive(7);

            Console.ReadLine();
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            VehicleFactory factory = new ConcreteVehicleFactory();

            IFactory Car = factory.GetVehicle("Car");

            Car.Drive(80);

            IFactory bike = factory.GetVehicle("Bike");

            bike.Drive(60);

            Console.ReadKey();
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            var factory = new ConcreteVehicleFactory();

            IFactory bike = factory.GetVehicle("bike");

            bike.Drive(50);

            IFactory scooter = factory.GetVehicle("scooter");

            scooter.Drive(25);

            Console.ReadLine();
        }
 static void Main(string[] args)
 {
     VehicleFactory factory = new ConcreteVehicleFactory();
     IFactory scooter = factory.GetVehicle("Scooter");
     scooter.Drive(10);
     IFactory bike = factory.GetVehicle("Bike");
     bike.Drive(20);
     Console.ReadKey();
 }