Example #1
0
 public Laptop(
     CPU cpuOfComputer, 
     RAM ramOfComputer, 
     HardDrive hardDriveOfComputer, 
     VideoCard videoCardOfComputer, 
     Battery laptopBattery)
     : base(ComputerType.PC, cpuOfComputer, ramOfComputer, hardDriveOfComputer, videoCardOfComputer, laptopBattery)
 {
     this.motherboard = 
         new Motherboard(this.CpuOfComputer, this.RamOfComputer, this.HardDriveOfComputer, this.VideoCardOfComputer);
 }
        public override Laptop MakeLaptop()
        {
            CPU cpu = new CPU(2, 64);
            RAM ram = new RAM(16);
            HardDrive hardDrive = new HardDrive(1000, false, 0);
            VideoCard videoCard = new VideoCard(false);
            Battery battery = new Battery();

            Laptop lenovoLaptop = new Laptop(cpu, ram, hardDrive, videoCard, battery);

            return lenovoLaptop;
        }
        public override Laptop MakeLaptop()
        {
            CPU cpu = new CPU(4, 32);
            RAM ram = new RAM(8);
            HardDrive hardDrive = new HardDrive(1000, false, 0);
            VideoCard videoCard = new VideoCard(false);
            Battery battery = new Battery();

            Laptop dellLaptop = new Laptop(cpu, ram, hardDrive, videoCard, battery);

            return dellLaptop;
        }
 public Computer(
     ComputerType typeOfComputer, 
     CPU cpuOfComputer, 
     RAM ramOfComputer, 
     HardDrive hardDriveOfComputer, 
     VideoCard videoCardOfComputer, 
     Battery laptopBattery)
 {
     this.TypeOfComputer = typeOfComputer;
     this.CpuOfComputer = cpuOfComputer;
     this.RamOfComputer = ramOfComputer;
     this.HardDriveOfComputer = hardDriveOfComputer;
     this.VideoCardOfComputer = videoCardOfComputer;
     this.LaptopBattery = laptopBattery;
 }