Example #1
0
        private IComputer ManufactureLaptop()
        {
            Ram ram = new Ram(16);
            HardDrive hardDrive = new HardDrive(1000, false, 0);
            IEnumerable<HardDrive> hardDrives = new List<HardDrive>() { hardDrive };
            IVideoCard videoCard = new ColorfulVideoCard();
            LaptopBatery battery = new LaptopBatery();
            ICpu cpu = new Cpu(2, CpuType.Bits64, new Motherboard(ram, videoCard));
            IComputer laptop = new Laptop(cpu, ram, hardDrives, videoCard, battery);

            return laptop;
        }
Example #2
0
 public Laptop(ICpu initialCpu, Ram initialRam, IEnumerable<HardDrive> initialHardDrives, IVideoCard initialVideoCard, LaptopBatery battery) 
     : base(ComputerType.Laptop, initialCpu, initialRam, initialHardDrives, initialVideoCard)
 {
     this.battery = battery;
 }