Beispiel #1
0
        static void Main(string[] args)
        {
            //create class instance
            Car c1 = new Car(10, 100, "BMW");

            c1.RegistreWithCarEngine(OnCarEngineHandler);

            Console.WriteLine("-----Speeding up---------");
            for (int i = 0; i < 6; i++)
            {
                c1.Accelerate(20);
            }
        }