コード例 #1
0
 public bool CheckingRequirements(Applications applications, HardDrive hardDrive, RAM ram, Games game, GPU gpu)
 {
     if (ram.TotalGigabytes > applications.RequiredRam &&
         applications.RequiredStorage < hardDrive.AvailableStorage && game.RequiredEffectiveMemory < gpu.EffectiveMemory)
     {
         return(true);
     }
     else
     {
         Console.WriteLine("Sorry, you do not have enough RAM or available memory for storage.");
         return(false);
     }
 }
コード例 #2
0
 //constructor
 public Motherboard(string manufacturer, RAM ram, CPU cpu, HardDrive hardDrive, GPU gpu, Applications applications)
 {
     Manufacturer    = manufacturer;
     TemporaryMemory = ram;
     Processor       = cpu;
     Storage         = hardDrive;
     Graphics        = gpu;
     Application     = applications;
 }
コード例 #3
0
 //member methods
 public void ProcessInstall(Applications applications, HardDrive hardDrive, RAM ram, Games game, GPU gpu)
 {
     if (CheckingRequirements(applications, hardDrive, ram, game, gpu) == true)
     {
         hardDrive.ApplicationsInHardDrive.Add(applications);
     }
 }