Add a static method called Product to the Math class in Listing 20.1. This method must calculate the product of two parameters and be encapsulated by instances of the Calculation delegate. Write the code for testing this method with the delegate.
Write a program similar to Listing 20.2. This time, instead of letting a number be manipulated by three different math operations, let the program allow an initial single letter to be manipulated by the three following string operations: "Add an 'A' to the string", "Add a B to the string", and "Add a C to the string". Allow the user to put together any sequence of string operations with a maximum of twenty operations.
Expand Listing 20.4 with another subscriber class called Motorbike. Allow Motorbike objects to subscribe to the events fired by the GameController object by equipping it with a suitable event handler and so forth, similar to the Car class. Program the event handler so that when one of the signals MoveRequestType.FastForward or MoveRequestType.SlowForward are received, the Motorbike object moves forward by 30. If the MoveRequestType.Reverse is received, reverse the Motorbike object by 3 kilometers. Allow the user to add and remove Motorbike objects similar to that of the Car objects.