static void Main(string[] args) { AbstractFactory carFactory = new CarFactory(); AbstractCar car = carFactory.CreateProduct(); car.Run(); AbstractFactory busFactory = new BusFactory(); AbstractCar bus = busFactory.CreateProduct(); bus.Run(); Console.Read(); }
public Client(CarFactory car_factory) { abstractCar = car_factory.CreateCar(); abstractEngine = car_factory.CreateEngine(); abstractBody = car_factory.CreateBody(); }
public Customer(Abstractions.AbstractFactory factory, Models model) { factory.Model = model; car = factory.GetCar(); }
public Client(CarFactory car_factory) { abstractCar = car_factory.CreateCar(); abstractEngine = car_factory.CreateEngine(); abstractshape = car_factory.CreateShape(); }
public Client(CarFactory car_factory) { abstractCar = car_factory.CreateCar(); abstractEngine = car_factory.CreateEngine(); abstractkuzov = car_factory.CreateKuzov(); }