// constructor (Spawner) public Motherboard(string manufacturer, RAM ram, CPU cpu, HardDrive hardDrive, GPU gpu) { this.manufacturer = manufacturer; this.temporaryMemory = ram; this.processor = cpu; this.storage = hardDrive; this.graphics = gpu; }
// constructor (Spawner) public Computer() { graphics = new GPU("AMD", 16); temporaryMemory = new RAM(32, "Kingston"); processor = new CPU("IBM", "cpu1"); storage = new HardDrive(1200, 900); motherboard = new Motherboard("Intel", temporaryMemory, processor, storage, graphics); }
// member methods (Can do) public void CheckRequirements(Applications applications, HardDrive hardDrive, RAM ram, GPU gpu) { if (ram.totalGigabytes >= applications.requiredRAM && hardDrive.availableStorage >= applications.requiredStorage) { hardDrive.ProcessInstall(applications, hardDrive, ram, gpu); } else { Console.WriteLine("Does not meet requirements to run"); } }
// member methods (Can do) public void ProcessInstall(Applications applications, HardDrive hardDrive, RAM ram, GPU gpu) { hardDrive.ApplicationsInHardDrive.Add(applications); }