Example #1
0
        public void Assemble(ComputerFactory factory)
        {
            IMonitor   monitor   = factory.CreateMonitor();
            IProcessor processor = factory.CreateProcessor();
            IHardDisk  hardDisk  = factory.CreateHardDisk();

            processor.PerformOperation();
            hardDisk.StoreData();
            monitor.Display();
        }
Example #2
0
 public ComputerShop(ComputerFactory factory)
 {
     this.factory = factory;
 }