Пример #1
0
 public Computer()
 {
     gpu     = new GPU("Ryden", 10.0);
     cpu     = new CPU("Corsair", "Butt Pirate");
     hd      = new HardDrive(1000.0, 970.0);
     ram     = new RAM(36.0, "Corsair");
     motherB = new MotherBoard("Ryzen", ram, cpu, hd, gpu);
 }
Пример #2
0
 public MotherBoard(string manufacturer, RAM ram, CPU cpu, HardDrive hardDrive, GPU gpu)
 {
     Manufacturer    = manufacturer;
     TemporaryMemory = ram;
     Processor       = cpu;
     Storage         = hardDrive;
     Graphics        = gpu;
 }
Пример #3
0
 public void ProcessInstall(Applications app, HardDrive hd, RAM ram, GPU gpu)
 {
     if (checkRequirements(app, hd, ram, gpu))
     {
         hd.ApplicationsInHardDrive.Add(app);
         hd.AvailableStorage -= app.RequriedStorage;
     }
 }
Пример #4
0
 public bool checkRequirements(Applications app, HardDrive hd, RAM ram, GPU gpu)
 {
     if (app.ApplicationType.Equals("Game"))
     {
         if (ram.TotalGigbytes >= app.RequriedRam && hd.AvailableStorage >= app.RequriedStorage && gpu.RequiredEffectiveMemory >= app.RequiredEffectiveMemory)
         {
             return(true);
         }
     }
     else
     {
         if (ram.TotalGigbytes >= app.RequriedRam && hd.AvailableStorage >= app.RequriedStorage)
         {
             return(true);
         }
     }
     return(false);
 }