public Computer()
        {
            HardDrive hardDrive = new HardDrive();
            GPU       gpu       = new GPU();
            RAM       ram       = new RAM();
            CPU       cpu       = new CPU();

            Motherboard motherboard = new Motherboard("Lenovo", ram, cpu, hardDrive, gpu);

            ram.totalGigabytes         = 16.0;
            cpu.manufacturer           = "Intel";
            cpu.name                   = "i7-9700";
            hardDrive.totalStorage     = 1000.0;
            hardDrive.availableStorage = 950.0;
            gpu.manufacturer           = "Nvidia";
            gpu.effectiveMemory        = 16.0;


            Games games = new Games();

            motherboard.InstallApplication(app, hardDrive, ram, games, gpu);
        }
Example #2
0
 public void InstallApplication(Applications app, HardDrive hardDrive, RAM ram, Games games, GPU gpu)
 {
     storage.ApplicationsInHardDrive = new List <Applications>();
     if (temporaryMemory.totalGigabytes > app.requiredRAM && storage.availableStorage > app.requiredStorage)
     {
         processor.CheckRequirements(app, hardDrive, ram, games, gpu);
         storage.ApplicationsInHardDrive.Add(app);
     }
     else
     {
         Console.WriteLine("Memory storage full");
     }
 }
Example #3
0
 public Motherboard(string manufacturer, RAM ram, CPU cpu, HardDrive hardDrive, GPU gpu)
 {
     Manufacturer    = manufacturer;
     temporaryMemory = ram;
     processor       = cpu;
     storage         = hardDrive;
     graphics        = gpu;
 }
Example #4
0
        public bool CheckGraphicsRequirementsForGame(Applications app, HardDrive hardDrive, Games games, GPU gpu, RAM ram)
        {
            bool meetsSystemGraphicsRequirements = false;

            if (app == games)
            {
                if (gpu.effectiveMemory > games.requiredEffectiveMemory)
                {
                    meetsSystemGraphicsRequirements = true;
                }
                else
                {
                    Console.WriteLine("System does not meet the required effective memory");
                }
            }
            else
            {
            }
            return(meetsSystemGraphicsRequirements);
        }
Example #5
0
        public bool CheckRequirements(Applications app, HardDrive hardDrive, RAM ram, Games games, GPU gpu)
        {
            bool availableMemorySpace = false;

            if ((app.requiredRAM < ram.totalGigabytes) && (app.requiredStorage < hardDrive.availableStorage))
            {
                CheckGraphicsRequirementsForGame(app, hardDrive, games, gpu, ram);
                ProcessInstall(app, hardDrive, ram);
                availableMemorySpace = true;
            }
            else
            {
                Console.WriteLine("Memory is full");
            }
            return(availableMemorySpace);
        }