public Computer(CPU cpu, RAM ram, HardDriver hardDriver, IDrawable videoCard) { this.CPU = cpu; this.RAM = ram; this.HardDrives = hardDriver; this.VideoCard = videoCard; }
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; }
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; }
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; }
public PC(CPU cpu, RAM ram, HardDriver hardDriver, IDrawable videoCard) : base(cpu, ram, hardDriver, videoCard) { }