Ejemplo n.º 1
0
        private static void Main(string[] args)
        {
            Carfactory carfactory = new ConcreteCarFactory();
            CarClient  carClient  = new CarClient(carfactory);

            carClient.BuildMicroCar(Location.USA);
            carClient.BuildMiniCar(Location.INDIA);
            carClient.BuildLuxaryCar(Location.DEFAULT);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            CarFactory carFactory = new ConcreteCarFactory();
            CarClient  carClient  = new CarClient(carFactory);

            carClient.BuilderMicroCar(Location.USA);
            carClient.BuildMiniCar(Location.INDIA);
            carClient.BuildLuxuryCar(Location.DEFAULT);

            Console.ReadKey();
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            CarFactory carFactory = new ConcreteCarFactory();
            CarClient  carClient  = new CarClient(carFactory);

            Console.WriteLine("Enter the car type (MINI, MICRO, LUXURY)");
            string ip = Console.ReadLine();

            if (ip == "LUXURY")
            {
                carClient.BuildLuxuryCar(Location.DEFAULT, CarType.LUXURY);
            }
            if (ip == "MICRO")
            {
                carClient.BuildMicroCar(Location.USA, CarType.MICRO);
            }
            if (ip == "MINI")
            {
                carClient.BuildMiniCar(Location.INDIA, CarType.MINI);
            }


            Console.Read();
        }