public void CheckRequirementsForGame(Game game, HardDrive hardDrive, RAM ram, GPU gpu) { if (ram.TotalGigabytes > game.RequiredRam && hardDrive.AvailableStorage > game.RequiredStorage && gpu.EffectiveMemory > game.RequiredEffectiveMemory) { ProcessInstallApp(game, hardDrive, ram); } }
public void CheckRequirementsForApp(Applications app, HardDrive hardDrive, RAM ram, GPU gpu) { if (ram.TotalGigabytes > app.RequiredRam && hardDrive.AvailableStorage > app.RequiredStorage) { ProcessInstallApp(app, hardDrive, ram); } }
//Conductor (spawn) public MotherBoard(string manufacturer, CPU cpu, RAM ram, HardDrive hardDrive, GPU gpu) { Manufacturer = manufacturer; TemporaryMemory = ram; Processor = cpu; Storage = hardDrive; Graphics = gpu; }
//Conductor (Spawn) public Computer() { MotherBoard = new MotherBoard("Msi", CPU, RAM, HardDrive, GPU); CPU = new CPU("IBM", "Intel"); RAM = new RAM(16, "OCZ"); HardDrive = new HardDrive(250, 250); GPU = new GPU("Nvaida", 8); }
//member variables (has a) //constructor (spawner) public Computer() { GPU gpu = new GPU(2.0); HardDrive hardDrive = new HardDrive(20.0, 20.0); RAM ram = new RAM(8.0); CPU cpu = new CPU(); Game game = new Game(2.0); }
//Game class has a variable RequiredEffectiveMemory public bool CheckRequirements(Application application, HardDrive hardDrive, RAM ram, GPU gpu) { bool installApplication = false; if (ram.temporaryMemory > application.requiredRAM && hardDrive.totalStorage > application.requiredStorage || gpu.effectiveMemory > application.requiredEffectiveMemory) { ProcessInstall(application, hardDrive, ram); installApplication = true; } return(installApplication); }
//member methods (can do) public void ProcessInstall(Application application, HardDrive hardDrive, RAM ram) { hardDrive.ApplicationsInHardDrive.Add(application); }
public void ProcessInstallGame(Game game, HardDrive hardDrive, RAM ram) { hardDrive.ApplicationsInHardDrive.Add(game); }
//Member method (Can do) public void ProcessInstallApp(Applications app, HardDrive hardDrive, RAM ram) { hardDrive.ApplicationsInHardDrive.Add(app); }