This example modifies the previous example by creating another class “Speedometer”. This class belongs to class “Car” and it can show the current speed.
Change the program so that every time a driver accelerate or decelerate the car, the car will ask the speedometer to show the current speed.