Exemple #1
0
        public void UseComputer()
        {
            Cpu         cpu         = new Cpu("amd", "amd cpu");
            Gpu         gpu         = new Gpu("nvidia", 1.0);
            Ram         ram         = new Ram(4.0, "onyo");
            HardDrive   hardDrive   = new HardDrive(300.00, 200.00);
            MotherBoard motherBoard = new MotherBoard("avia", cpu, ram, hardDrive, gpu);
            Games       game        = new Games("Call of Duty", "Shooter", 1.0, 30.0, 2.0);
            bool        videoOk     = cpu.CheckVideoRequirements(game, gpu);
            bool        appOk       = cpu.CheckRequirements(game, hardDrive, ram);

            if (videoOk && appOk)
            {
                cpu.ProcessInstall(game, hardDrive, ram);
            }
            TextEditor textEditor = new TextEditor("notepad", "editor", 1.0, 20.5);
            bool       itsOk      = cpu.CheckRequirements(game, hardDrive, ram);

            if (itsOk)
            {
                cpu.ProcessInstall(textEditor, hardDrive, ram);
            }
        }
 public MotherBoard(string manufactuer, Cpu processor, Ram temporaryMemory, HardDrive storage, Gpu graphics)
 {
     this.manufactuer = manufactuer;
     Processor        = processor;
     TemporaryMemory  = temporaryMemory;
     Storage          = storage;
     Graphics         = graphics;
 }