コード例 #1
0
 public MotherBoard(string manufacturer, RAM ram, CPU cpu, Harddrive hardDrive, GPU gpu)
 {
     Manufacturer    = manufacturer;
     TemporaryMemory = ram;
     Processor       = cpu;
     Storage         = hardDrive;
     Graphics        = gpu;
 }
コード例 #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);
 }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
 //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");
 }