示例#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();
        }
示例#2
0
 public ComputerShop(ComputerFactory factory)
 {
     this.factory = factory;
 }