public static Computer BuildHpLaptop()
 {
     //build laptop
     var card = new HardDrive() { };
     card.IsMonochrome = false;
     var laptopRam = new ComputerRam(RamBits / 2);
     ComputerCpu laptopCpu = new ComputerCpu(RamBits / 4, 64, laptopRam, card);
     HardDrive[] laptopHardDrives = new[] { new HardDrive(500, false, 0) };
     LaptopBattery laptopBattery = new LaptopBattery();
     return new Computer(ComputerTypes.Laptop, laptopCpu, laptopRam, laptopHardDrives, card, laptopBattery);
 }
Esempio n. 2
0
        //constructors
        internal Computer(ComputerTypes type, ComputerCpu cpu, ComputerRam ram, IEnumerable<HardDrive> hardDrives, HardDrive videoCard, LaptopBattery battery)
        {
            this.Cpu = cpu;
            this.Ram = ram;
            this.HardDrives = hardDrives;
            this.VideoCard = videoCard;
            if (type != ComputerTypes.Laptop && type != ComputerTypes.Pc)
            {
                this.VideoCard.IsMonochrome = true;
            }

            this.battery = battery;
        }
 public static Computer BuildDellLaptop()
 {
     //build laptop
     var dellLaptopRam = new ComputerRam(RamBits);
     var dellLaptopVideoCard = new HardDrive() { };
     dellLaptopVideoCard.IsMonochrome = false;
     List<HardDrive> dellLaptopDrives = new List<HardDrive>();
     HardDrive dellLaptopDrive = new HardDrive(1000, false, 0);
     dellLaptopDrives.Add(dellLaptopDrive);
     ComputerCpu dellLaptopCpu = new ComputerCpu(RamBits / 2, 32, dellLaptopRam, dellLaptopVideoCard);
     LaptopBattery dellLaptopBattery = new LaptopBattery();
     return new Computer(ComputerTypes.Laptop, dellLaptopCpu, dellLaptopRam, dellLaptopDrives, dellLaptopVideoCard, dellLaptopBattery);
 }
Esempio n. 4
0
        //constructors
        internal Computer(ComputerTypes type, ComputerCpu cpu, ComputerRam ram, IEnumerable <HardDrive> hardDrives, HardDrive videoCard, LaptopBattery battery)
        {
            this.Cpu        = cpu;
            this.Ram        = ram;
            this.HardDrives = hardDrives;
            this.VideoCard  = videoCard;
            if (type != ComputerTypes.Laptop && type != ComputerTypes.Pc)
            {
                this.VideoCard.IsMonochrome = true;
            }

            this.battery = battery;
        }
        public static Computer BuildHpLaptop()
        {
            //build laptop
            var card = new HardDrive()
            {
            };

            card.IsMonochrome = false;
            var         laptopRam = new ComputerRam(RamBits / 2);
            ComputerCpu laptopCpu = new ComputerCpu(RamBits / 4, 64, laptopRam, card);

            HardDrive[]   laptopHardDrives = new[] { new HardDrive(500, false, 0) };
            LaptopBattery laptopBattery    = new LaptopBattery();

            return(new Computer(ComputerTypes.Laptop, laptopCpu, laptopRam, laptopHardDrives, card, laptopBattery));
        }
        internal static Computer BuildLenovoLaptop()
        {
            //build laptop
            var card = new HardDrive()
            {
            };

            card.IsMonochrome = false;
            var         laptopRam = new ComputerRam(RamBits * 2);
            ComputerCpu laptopCpu = new ComputerCpu(RamBits, 128, laptopRam, card);

            HardDrive[]   laptopHardDrives = new[] { new HardDrive(1000, false, 0) };
            LaptopBattery laptopBattery    = new LaptopBattery();

            return(new Computer(ComputerTypes.Laptop, laptopCpu, laptopRam, laptopHardDrives, card, laptopBattery));
        }
        public static Computer BuildDellLaptop()
        {
            //build laptop
            var dellLaptopRam       = new ComputerRam(RamBits);
            var dellLaptopVideoCard = new HardDrive()
            {
            };

            dellLaptopVideoCard.IsMonochrome = false;
            List <HardDrive> dellLaptopDrives = new List <HardDrive>();
            HardDrive        dellLaptopDrive  = new HardDrive(1000, false, 0);

            dellLaptopDrives.Add(dellLaptopDrive);
            ComputerCpu   dellLaptopCpu     = new ComputerCpu(RamBits / 2, 32, dellLaptopRam, dellLaptopVideoCard);
            LaptopBattery dellLaptopBattery = new LaptopBattery();

            return(new Computer(ComputerTypes.Laptop, dellLaptopCpu, dellLaptopRam, dellLaptopDrives, dellLaptopVideoCard, dellLaptopBattery));
        }
 internal static Computer BuildLenovoLaptop()
 {
     //build laptop
     var card = new HardDrive() { };
     card.IsMonochrome = false;
     var laptopRam = new ComputerRam(RamBits * 2);
     ComputerCpu laptopCpu = new ComputerCpu(RamBits, 128, laptopRam, card);
     HardDrive[] laptopHardDrives = new[] { new HardDrive(1000, false, 0) };
     LaptopBattery laptopBattery = new LaptopBattery();
     return new Computer(ComputerTypes.Laptop, laptopCpu, laptopRam, laptopHardDrives, card, laptopBattery);
 }