public MotherBoard(string manufactuer, Cpu processor, Ram temporaryMemory, HardDrive storage, Gpu graphics)
 {
     this.manufactuer = manufactuer;
     Processor        = processor;
     TemporaryMemory  = temporaryMemory;
     Storage          = storage;
     Graphics         = graphics;
 }
Example #2
0
 public bool CheckRequirements(Applications app, HardDrive hardDrive, Ram ram)
 {
     if (ram.totalGigabytes > app.requiredRam && hardDrive.availableStorage > app.requiredStorage)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Example #3
0
        public void UseComputer()
        {
            Cpu         cpu         = new Cpu("amd", "amd cpu");
            Gpu         gpu         = new Gpu("nvidia", 1.0);
            Ram         ram         = new Ram(4.0, "onyo");
            HardDrive   hardDrive   = new HardDrive(300.00, 200.00);
            MotherBoard motherBoard = new MotherBoard("avia", cpu, ram, hardDrive, gpu);
            Games       game        = new Games("Call of Duty", "Shooter", 1.0, 30.0, 2.0);
            bool        videoOk     = cpu.CheckVideoRequirements(game, gpu);
            bool        appOk       = cpu.CheckRequirements(game, hardDrive, ram);

            if (videoOk && appOk)
            {
                cpu.ProcessInstall(game, hardDrive, ram);
            }
            TextEditor textEditor = new TextEditor("notepad", "editor", 1.0, 20.5);
            bool       itsOk      = cpu.CheckRequirements(game, hardDrive, ram);

            if (itsOk)
            {
                cpu.ProcessInstall(textEditor, hardDrive, ram);
            }
        }
Example #4
0
 public void ProcessInstall(Applications app, HardDrive hardDrive, Ram ram)
 {
     hardDrive.applicationsInHardDrive.Add(app);
     hardDrive.totalStorage -= app.requiredStorage;
     //Ram only exists if application is running si I dont know why its here
 }