Re: Extended Time Zone Class

Create a project which consists of two classes; the base Time class and a derived extTime class.

The base class should have data members that are used to represent the hour and the minute both of type integer. The derived class has one additional data member that represents the time zone. This data member should have a string data type.

Create a function for each of the operations listed below:

Base class:

set the time
return the time
print the time
increment the hour
increment the minute
a default constructor and a constructor with parameters
Derived class: should have (in addition to the classes above) its own

print which prints the time zone in addition to the time
constructor

Construct the main method so that it can test the member functions of each of the parent and the child class by instantiating objects of these classes and calling the appropriate functions.

Leave a Reply

Your email address will not be published. Required fields are marked *