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); }
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(); }
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(); }