Пример #1
0
        static void Two()
        {
            Console.WriteLine("-------------------AUTOMOBILE-------------------");
            Automobile automobile = new Automobile("Volkswage",
                                                   220,
                                                   "Black");

            Console.WriteLine(automobile.GetInfo());
            automobile.Update();
            Console.WriteLine(automobile.GetInfo());
            Console.WriteLine("-------------------SPORTCAR-------------------");
            Sportcar sportcar = new Sportcar("Lamborghini",
                                             350,
                                             "Yellow",
                                             2);

            Console.WriteLine(sportcar.GetInfo());
            sportcar.Update();
            Console.WriteLine(sportcar.GetInfo());
            Console.WriteLine("-------------------EXECUTIVECAR-------------------");
            ExecutiveCar executiveCar = new ExecutiveCar("BMW", 250,
                                                         "Grey", true);

            Console.WriteLine(executiveCar.GetInfo());
            executiveCar.Update();
            Console.WriteLine(executiveCar.GetInfo());
        }