public static void Main()
        {
            Laptop firstLaptop = new Laptop("Latitude", LaptopManufacturers.Dell, 3000, 3500, 4.5, "i7 QM", "8GB", "N-VIDIA", "SSD 128GB", "15.4\"", "Lit-Ion,6cells");

            Console.WriteLine(firstLaptop);

            var secondLAptop = new Laptop("Satellite", LaptopManufacturers.Toshiba, 800, "i3", "4GB", "N-VIDIA", "HDD 320GB", "15.4\"");

            // method for battery adding
            secondLAptop.AddBattery(2500, 1.5, "Lit-Ion,3cells");

            Console.WriteLine(new string('=', 30));

            Console.WriteLine(secondLAptop);

            var thirdLaptop = new Laptop("Aspire", 1200, LaptopManufacturers.Acer);

            Console.WriteLine(thirdLaptop);
        }
Пример #2
0
        public static void Main()
        {
            Laptop firstLaptop = new Laptop("Latitude", LaptopManufacturers.Dell, 3000, 3500, 4.5, "i7 QM", "8GB", "N-VIDIA", "SSD 128GB", "15.4\"", "Lit-Ion,6cells");

            Console.WriteLine(firstLaptop);

            var secondLAptop = new Laptop("Satellite", LaptopManufacturers.Toshiba, 800, "i3", "4GB", "N-VIDIA", "HDD 320GB", "15.4\"");

            // method for battery adding
            secondLAptop.AddBattery(2500, 1.5, "Lit-Ion,3cells");

            Console.WriteLine(new string('=', 30));

            Console.WriteLine(secondLAptop);

            var thirdLaptop = new Laptop("Aspire", 1200, LaptopManufacturers.Acer);

            Console.WriteLine(thirdLaptop);
        }
Пример #3
0
        static void Main()
        {
            Laptop example1 = new Laptop("Lenovo", 2999, new Battery("Li-Ion", 1), "Lenovo", "Intel", 4, "Nvidia", "", "Full HD");

            Laptop example2 = new Laptop("HP", 899.99);

            Laptop example3 = new Laptop("Toshiba", 2312.21, new Battery("SomeOne", 20), "Toshiba", "Intel", 4, "Nvidia", "400GB SATA", "19 inch");


            Battery battery = new Battery("Li-IOn", 4);

            example2.AddBattery(battery);

            Laptop temp3 = new Laptop("HP 500", 1499.99, new Battery("Li", 2), "HP");

            Console.WriteLine(example1);
            Console.WriteLine();
            Console.WriteLine(example2);
            Console.WriteLine();
            Console.WriteLine(example3);
        }