Beispiel #1
0
        static void Main(string[] args)
        {
            CarClass car = new CarClass(2018, "Honda");

            Console.WriteLine(car.Speed);

            for (int i = 0; i < 5; i++)
            {
                car.Accelerate();
                Console.WriteLine(car.Speed);
            }
            for (int i = 0; i < 5; i++)
            {
                car.Brake();
                Console.WriteLine(car.Speed);
            }
            Console.ReadLine();
        }