$24
Objectives:
Learn about inheritance
Explore how to redefine the member functions of a base class
Question:
First, Download lab09.cpp. In this file, the definition of the class clockType has given. Think of the class clockType as the base class. Derive the class extClockType from the class clockType, by adding a class member variable to store the time zone (int tz) and necessary class member functions to make the class functional. Finally, use the driver program to test your classes.
Hint: Extending the timezone is only one modification required by the extClockType derived class. Further modifications include:
Override printTime() function to include the timezone in the output as given output format
Overload setTime() function to accept the timezone in the parameter list
Add the incrementTimeZones() function to add 1 hour to the current time zone.
You must not change the code in the driver program, and you should get the same output.
Submit only the modified lab09.cpp file.
Output: