Esempio n. 1
0
 //member variables
 public void ProcessInstall(Applications app, HardDrive hardDrive, RAM ram)
 {
     //add app to the list on hard drive
     ram.totalGigabytes         -= app.requiredRam;
     hardDrive.availableStorage -= app.requiredStorage;
     hardDrive.applicationsInHardDrive.Add(app);
 }
        //constructor
        public Motherboard(string manufacturer, CPU processor, RAM temporaryMemory, HardDrive hardDrive, GPU gpu)
        {
            Applications slack = new Applications("Slack", "Messaging Service", 4.0, 0.512);

            this.manufacturer    = manufacturer;
            this.processor       = processor;
            this.temporaryMemory = temporaryMemory;
            storage  = hardDrive;
            graphics = gpu;
        }
Esempio n. 3
0
        public bool CheckRequirements(Applications app, HardDrive hardDrive, RAM ram)
        {
            bool canRunProgram = false;

            if (hardDrive.availableStorage > app.requiredStorage && ram.totalGigabytes > app.requiredRam)
            {
                canRunProgram = true;
                Console.WriteLine("Your computer's hardware is sufficient to install and run the program.");
                return(canRunProgram);
            }
            else
            {
                canRunProgram = false;
                return(canRunProgram);
            }
        }