Esempio n. 1
0
 public Laptop(string model, decimal price, string brand, string cpu, string ram,
     string vga, string hdd, string screen, BatteryOptions battery)
     : this(model, price, brand, cpu, ram, vga, hdd, screen)
 {
     this.BatteryType = battery.BatteryType;
     this.BatteryLife = battery.BatteryLife;
 }
Esempio n. 2
0
        static void Main()
        {
            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;

            BatteryOptions lenovoBattery = new BatteryOptions("Li-Ion, 4-cells, 2550 mAh", 4.5);

            Laptop firstPC = new Laptop("Lenovo Yoga 2 Pro", 2259m,"Lenovo", "Intel Core i5-4210U (2-core, 1.70 - 2.70 GHz, 3MB cache)",
                "8 GB", "Intel HD Graphics 4400", "128GB SSD", @"13.3' (33.78 cm) – 3200 x 1800 (QHD+)IPS sensor display", lenovoBattery);

            Laptop secoundPC = new Laptop("HP 250 G2", 699.00m);

            Laptop thirdPC = new Laptop("Lenovo Yoga 2 Pro", 2259m,"Lenovo", "Intel Core i5-4210U (2-core, 1.70 - 2.70 GHz, 3MB cache)",
                "8 GB", "Intel HD Graphics 4400", "128GB SSD", @"13.3' (33.78 cm) – 3200 x 1800 (QHD+)IPS sensor display");

            Console.WriteLine(firstPC);
            Console.WriteLine(secoundPC);
            Console.WriteLine(thirdPC);
        }