예제 #1
0
 public Motherboard(string manufacturer)
 {
     this.manufacturer = manufacturer;
     processor         = new CPU();
     tempMemory        = new RAM();
     storage           = new HardDrive();
     graphics          = new GPU();
 }
예제 #2
0
 // constructor
 public Computer()
 {
     cpu         = new CPU("Intel", "i5-8265U");
     ram         = new RAM(12, "Samsung");
     gpu         = new GPU("Nvidia", 32);
     hardDrive   = new HardDrive(256, 256);
     motherboard = new Motherboard("Intel", ram, cpu, hardDrive, gpu);
 }
예제 #3
0
 public Motherboard(string manufacturer, RAM ram, CPU cpu, HardDrive hardDrive, GPU gpu)
 {
     Manufacturer    = manufacturer;
     TemporaryMemory = ram;
     Processor       = cpu;
     Storage         = hardDrive;
     Graphics        = gpu;
 }
예제 #4
0
 // constructor
 public Motherboard(string manufacturer, RAM ram, CPU cpu, HardDrive hardDrive, GPU gpu)
 {
     this.manufacturer = manufacturer;
     temporaryMemory   = ram;
     processor         = cpu;
     storage           = hardDrive;
     graphics          = gpu;
 }
예제 #5
0
        // Member methods
        public bool ProcessInstall(Applications app, HardDrive hardDrive, RAM ram, GPU gpu)
        {
            bool installOK = CheckRequirements(app, hardDrive, ram, gpu);

            if (installOK)
            {
                hardDrive.applicationsInHardDrive.Add(app);
                hardDrive.availableStorage -= app.requiredStorage;
            }
            return(installOK);
        }
예제 #6
0
 //member methods
 public void CheckRequirements(Applications app, HardDrive hardDrive, RAM ram, GPU gpu)
 {
     if (ram.TotalGigabytes > app.RequiredRAM && hardDrive.AvailableStorage > app.RequiredStorage)
     {
         hardDrive.ProcessInstall(app, hardDrive, ram, gpu);
     }
     else
     {
         Console.WriteLine("Does not meet installation requirements");
     }
 }
예제 #7
0
        public void BuildComputer()
        {
            GPU         gpu         = new GPU("Dell", 512);
            CPU         cpu         = new CPU("Dell", "Name");
            HardDrive   hardDrive   = new HardDrive(1000.0, 950.0);
            RAM         ram         = new RAM(512, "Dell");
            Motherboard motherboard = new Motherboard("Dell", ram, cpu, hardDrive, gpu);
            Games       game        = new Games("Solitaire", "Game", 20, 200, 6);

            cpu.CheckRequirements(game, hardDrive, ram, gpu);
        }
예제 #8
0
        public bool CheckRequirements(Applications app, HardDrive hardDrive, RAM ram, GPU gpu)
        {
            bool rtn = false;

            if (ram.totalGigabytes >= app.requiredRAM &&
                hardDrive.availableStorage >= app.requiredStorage &&
                gpu.effectiveMemory >= app.GraphicsRequirement())
            {
                rtn = true;
            }

            return(rtn);
        }
예제 #9
0
 //member methods
 public void ProcessInstall(Applications app, HardDrive hardDrive, RAM ram, GPU gpu)
 {
     hardDrive.ApplicationsInHardDrive.Add(app);
 }