static void Main(string[] args) { CarFactory carFactory = new CarFactory(); ICarSupplier carSuppllier = carFactory.GetCar(CarFactory.CarType.Peugeot); carSuppllier.Start(); carSuppllier = carFactory.GetCar(CarFactory.CarType.Benz); carSuppllier.Start(); carSuppllier = carFactory.GetCar(CarFactory.CarType.Bmw); carSuppllier.Start(); }
static void Main(string[] args) { CarFactory car = new CarFactory(); ICar c = car.GetCar(CarFactory.carType.Fast); c.Run(); Console.ReadLine(); }
public void AssembleCar(CarFactory factory) { factory.GetCar(); }