static void Main(string[] args)
        {
            Car car  = new Car(null, 0);
            Car car1 = new Car(null, 0);

            car.AskData();
            car1.AskData();
            Console.WriteLine(car.ShowCarInfo());
            Console.WriteLine(car1.ShowCarInfo());
            car.Accelerate();
            car1.Accelerate();
            Console.WriteLine(car.ShowCarInfo());
            Console.WriteLine(car1.ShowCarInfo());
            car.Brake();
            car1.Brake();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.OutputEncoding = System.Text.Encoding.UTF8;
            Car car = new Car();

            car.AskData();
            car.ShowCarInfo();
            car.Accelerate();
            car.Brake();

            Car car2 = new Car();

            car2.AskData();
            car2.ShowCarInfo();
            car2.Accelerate();
            car2.Brake();

            Console.ReadKey();
        }