Esempio 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);
        }
Esempio 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();
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            CarFactory carFactory = new ConcreteCarFactory();
            Client     client     = new Client(carFactory);

            client.BuildLuxuryCar(Location.INDIA);
            client.BuildMicroCar(Location.USA);
            client.BuildMiniCar(Location.DEFAULT);
        }
Esempio n. 4
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();
        }