public static void Run()
        {
            VehicleFactory factory = new ConcreteVehicleFactory();

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

            scooter.Drive(10);

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

            bike.Drive(20);

            Console.ReadKey();
        }
Exemplo n.º 2
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();
        }