Beispiel #1
0
        private static void MyBikes()
        {
            Bike b1 = new Bike("Brand1", "Red", "Road", 22, 8, 700, 8, 23, 32);
            Console.WriteLine(b1);
            Bike b2 = new Bike("Brand2", "Blue", "City", 1, 1, 700, 5, 28, 32);
            Console.WriteLine(b2);
            Bike b3 = new Bike("Brand3", "Green", "Mounten", 21, 2, 700, 4, 48, 36);
            Console.WriteLine(b3);
            Bike b4 = new Bike("Brand4", "Pink", "Hybrid", 7, 3, 700, 6, 30, 32);
            Console.WriteLine(b4);

            Console.WriteLine("------------------");

            b4.ToString();
            Console.WriteLine($"Active gear: {b4.ActiveGear}.");
            b4.ChangeGear(-4);
            Console.WriteLine($"Active gear: {b4.ActiveGear}.");

            b4.RingBell();
        }