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);
 }
Exemplo 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);
 }
Exemplo 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;
        }
Exemplo n.º 5
0
        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));
        }
Exemplo n.º 6
0
        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));
        }
Exemplo n.º 7
0
        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);
 }