Exemple #1
0
 public MotherBoard(string manufacturer, RAM ram, CPU cpu, Harddrive hardDrive, GPU gpu)
 {
     Manufacturer    = manufacturer;
     TemporaryMemory = ram;
     Processor       = cpu;
     Storage         = hardDrive;
     Graphics        = gpu;
 }
Exemple #2
0
 public Computer()
 {
     cpu   = new CPU("DELL", 16.0);
     gpu   = new GPU("gigabyte", 5.0);
     drive = new Harddrive(4.0, 6.0);
     ram   = new RAM(16, "G.skill");
     board = new MotherBoard(cpu.manufacturer, ram, cpu, drive, gpu);
     Console.WriteLine(cpu.manufacturer, cpu.effectiveMemory, gpu.manufacturer, board.Processor);
 }
        public bool CheckRequirements(Applications app, Harddrive hardDrive, RAM ram)
        {
            if (mother.TemporaryMemory.totalGigabytes >= app.requiredRAM && mother.Storage.availableStorage >= app.requiredStorage)
            {
                meetsRequirements = true;
            }
            else
            {
                meetsRequirements = false;
                Console.WriteLine("You have {0} storage and {1} RAM", mother.TemporaryMemory.totalGigabytes, mother.Storage.availableStorage);
                Console.WriteLine("This application requires {0} storage and {1} RAM", app.requiredStorage, app.requiredRAM);
            }

            return(meetsRequirements);
        }
        public bool CheckRequirementsForGame(Applications app, Harddrive hardDrive, RAM ram)
        {
            if (mother.TemporaryMemory.totalGigabytes >= app.requiredRAM && mother.Storage.availableStorage >= app.requiredStorage &&
                mother.Graphics.effectiveMemory >= game.requiredEffectiveMemory)
            {
                meetsRequirements = true;
            }
            else
            {
                meetsRequirements = false;
                Console.WriteLine("You have {0} storage and {1} RAM", mother.TemporaryMemory.totalGigabytes, mother.Storage.availableStorage);
                Console.WriteLine("This application requires {0} storage and {1} RAM", app.requiredStorage, app.requiredRAM);
                Console.WriteLine("This application also requires {0} memory and your memory is {1}", game.requiredEffectiveMemory, mother.Graphics.effectiveMemory);
            }

            return(meetsRequirements);
        }
 //should have somewhere that if true, it calls the install method
 public void ProcessInstall(Applications applications, Harddrive hardDrive, RAM ram)
 {
     mother.Storage.ApplicationsInHardDrive.Add(applications);
     Console.WriteLine("Install sucessful");
 }