コード例 #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
ファイル: CPU.cs プロジェクト: Randall-Gray/CriticalThinking
        // 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
ファイル: CPU.cs プロジェクト: Randall-Gray/CriticalThinking
        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);
 }