Using the Car code attached, add code that declares and raises an event named LowGas. Raised when the gas level reaches 5 or lower.
On the form side, add code so that when the LowGas event is raised, the event is handled by asking the user to pump gas using static event handling.
Implement the handling of the LowGas event using dynamic event handling. Remove the handler properly.
Develop a GreenCar that uses Car as a parent.
a. GreenCar will suppress the parent's GasLow event so that objects based on GreenCar will not be able to respond to the GasLow as is Instead, when GasLow fires, GreenCar will raise its own GasLow - you may use a different name - but only if the gas is at 2 or less gallons.
b. On the client side, divide the form into two areas, on for Car and another for GreenCar. Make sure each area has the needed controls to enter each car's data, with two sets of buttons to Drive and Pump Gas. However, since both sets of Drive and Pump Gas buttons will do same action; handle these events in one handler per button. For example handle Car and GreenCar's Drive click events in one handler, and do the same for the Pump Gas buttons. This will require you check which button was clicked so that you know which object to work on.