Exemple #1
0
 public Computer(CPU cpu, RAM ram, HardDriver hardDriver, IDrawable videoCard)
 {
     this.CPU = cpu;
     this.RAM = ram;
     this.HardDrives = hardDriver;
     this.VideoCard = videoCard;
  }
 public override PC GetPC()
 {
     var ram = new RAM(PCRAMAmount);
     var hardDrive = new HardDriver(PCHardDriveCapacity);
     var videoCard = new ColorfulVideoCard();
     var motherboard = new Motherboard(ram, videoCard);
     var cpu = new CPU(PCNumberOfCores, PCBits, motherboard);
     PC pc = new PC(cpu, ram, hardDrive, videoCard);
     return pc;
 }
 public override Laptop GetLaptop()
 {
     var ram = new RAM(LaptopRAMAmount);
     var hardDrive = new HardDriver(LaptopCapacity);
     var videoCard = new ColorfulVideoCard();
     var battery = new LaptopBattery();
     var motherboard = new Motherboard(ram, videoCard);
     var cpu = new CPU(LaptopNumberOfCores, LaptopBits, motherboard);
     Laptop laptop = new Laptop(battery, cpu, ram, hardDrive, videoCard);
     return laptop;
 }
 public override Server GetServer()
 {
     var ram = new RAM(ServerRAMAmount);
     var hardDrives = new List<HardDriver>() { new HardDriver(ServerHardDriveCapacityPerUnit), new HardDriver(ServerHardDriveCapacityPerUnit) };
     var raid = new HardDriver(hardDrives);
     var videoCard = new MonochromeVideoCard();
     var motherboard = new Motherboard(ram, videoCard);
     var cpu = new CPU(ServerNumberOfCores, ServerBits, motherboard);
     Server server = new Server(cpu, ram, raid, videoCard);
     return server;
 }
Exemple #5
0
        public override PersonalComputer MakePC()
        {
            var ram = new Ram(2);
            var videoCard = new VideoCard(false);
            var motherBoear = new Motherboard(ram, videoCard);
            var cpu = new Cpu(new Cpu32(), 2, motherBoear);
            var hdd = new HardDriver();
            var hardDrives = new List<HardDriver> { new HardDriver(500, false, 0) };

            return new PersonalComputer(cpu, ram, videoCard, hdd, hardDrives);
        }
Exemple #6
0
        public override Laptop MakeLaptop()
        {
            var laptopRam = new Ram(4);
            var laptopVideoCard = new VideoCard(false);
            var motherBoear = new Motherboard(laptopRam, laptopVideoCard);
            var laptopCpu = new Cpu(new Cpu64(), 2, motherBoear);
            var laptopHDD = new HardDriver();
            var laptopHardDrives = new List<HardDriver> { new HardDriver(500, false, 0) };
            var laptopBattery = new Battery();

            return new Laptop(laptopCpu, laptopRam, laptopVideoCard, laptopHDD, laptopHardDrives, laptopBattery);
        }
Exemple #7
0
        public override Server MakeServer()
        {
            var serverRam = new Ram(32);
            var serverVideoCard = new VideoCard();
            var motherBoear = new Motherboard(serverRam, serverVideoCard);
            var serverCpu = new Cpu(new Cpu32(), 4, motherBoear);
            var serverHDD = new HardDriver();
            var serrverHardDrives = new List<HardDriver> 
                        {
                            new HardDriver(
                                0, 
                                true, 
                                2, 
                                new List<HardDriver> 
                                { 
                                    new HardDriver(1000, false, 0), 
                                    new HardDriver(1000, false, 0) 
                                })
                        };

            return new Server(serverCpu, serverRam, serverVideoCard, serverHDD, serrverHardDrives);
        }
Exemple #8
0
 public PC(CPU cpu, RAM ram,  HardDriver hardDriver, IDrawable videoCard)
     : base(cpu, ram, hardDriver, videoCard)
 {
 }