示例#1
0
 public Computer(CPU cpu, RAM ram, HardDriver hardDriver, IDrawable videoCard)
 {
     this.CPU = cpu;
     this.RAM = ram;
     this.HardDrives = hardDriver;
     this.VideoCard = videoCard;
  }
示例#2
0
 public override PC GetPC()
 {
     var ram = new RAM(PCRAMAmount);
     var hardDrive = new HardDriver(PCHardDriveCapacity);
     var videoCard = new ColorfulVideoCard();
     var motherboard = new Motherboard(ram, videoCard);
     var cpu = new CPU(PCNumberOfCores, PCBits, motherboard);
     PC pc = new PC(cpu, ram, hardDrive, videoCard);
     return pc;
 }
示例#3
0
 public override Laptop GetLaptop()
 {
     var ram = new RAM(LaptopRAMAmount);
     var hardDrive = new HardDriver(LaptopCapacity);
     var videoCard = new ColorfulVideoCard();
     var battery = new LaptopBattery();
     var motherboard = new Motherboard(ram, videoCard);
     var cpu = new CPU(LaptopNumberOfCores, LaptopBits, motherboard);
     Laptop laptop = new Laptop(battery, cpu, ram, hardDrive, videoCard);
     return laptop;
 }
示例#4
0
 public override Server GetServer()
 {
     var ram = new RAM(ServerRAMAmount);
     var hardDrives = new List<HardDriver>() { new HardDriver(ServerHardDriveCapacityPerUnit), new HardDriver(ServerHardDriveCapacityPerUnit) };
     var raid = new HardDriver(hardDrives);
     var videoCard = new MonochromeVideoCard();
     var motherboard = new Motherboard(ram, videoCard);
     var cpu = new CPU(ServerNumberOfCores, ServerBits, motherboard);
     Server server = new Server(cpu, ram, raid, videoCard);
     return server;
 }
示例#5
0
文件: PC.cs 项目: damy90/Telerik-all
 public PC(CPU cpu, RAM ram,  HardDriver hardDriver, IDrawable videoCard)
     : base(cpu, ram, hardDriver, videoCard)
 {
 }