static void Main(string[] args) { Console.WriteLine("Client (a or b): "); var client = Console.ReadLine(); IFactory factory = client == "a" ? new ClientAFactory() : new ClientAFactory(); Order order = new Order() { Tablets = ParseInt(Console.ReadLine()), Computers = ParseInt(Console.ReadLine()), SmartPhones = ParseInt(Console.ReadLine()) }; var company = new HandyDandyManufacturingCompany(factory); Console.WriteLine(company.Computers.Count()); Console.WriteLine(company.Tablets.Count()); Console.WriteLine(company.SmartPhones.Count()); }
public void Produce(Order order) { CreateComputers(order.Computers); CreateComputers(order.Tablets); CreateComputers(order.SmartPhones); }