Beispiel #1
0
        static void Main(string[] args)
        {
            VehicleFactory vf        = new ConcreteVehicleFactory();
            ifactory       myvehicle = vf.generateVehicles("Bike");

            myvehicle.manufacture(10);
            myvehicle = vf.generateVehicles("car");
            myvehicle.manufacture(10);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            VehicleFactory obj = new ConcreteVehicleFactory();

            Ifactory myVehicle = obj.GenerateVehicles("Bike");

            myVehicle.manufacture(10);

            myVehicle = obj.GenerateVehicles("Car");
            myVehicle.manufacture(20);

            Console.ReadKey();
        }