static void Main(string[] args) { ComputerShop computerShop = new ComputerShop(); var mylappy = new LaptopBuilder(); computerShop.ConstructComputer(mylappy); mylappy.Computer.DisplayConfiguration(); var macBook = new AppleBuilder(); computerShop.ConstructComputer(macBook); macBook.Computer.DisplayConfiguration(); ReadKey(); }
private static void Builder() { ComputerShop computerShop = new ComputerShop(); ComputerBuilder computerBuilder; computerBuilder = new LaptopBuilder(); computerShop.ConstructComputer(computerBuilder); computerBuilder.Computer.DisplayConfiguration(); computerBuilder = new DesktopBuilder(); computerShop.ConstructComputer(computerBuilder); computerBuilder.Computer.DisplayConfiguration(); computerBuilder = new AppleBuilder(); computerShop.ConstructComputer(computerBuilder); computerBuilder.Computer.DisplayConfiguration(); Console.ReadKey(); }