Question: given lab09.cpp file in C++, lab09.cpp file: #include #include #include using namespace std; class clockType { public: void setTime(int,int,int); void getTime(int&,int&,int&)const; void printTime()const; void setH(int);

given "lab09.cpp" file in C++,

given "lab09.cpp" file in C++, lab09.cpp file: #include #include #include using namespace

lab09.cpp file: #include #include  #include using namespace std; class clockType { public: void setTime(int,int,int); void getTime(int&,int&,int&)const; void printTime()const; void setH(int); void setM(int); void setS(int); int getH()const; int getM()const; int getS()const; void incrementSeconds(); void incrementMinutes(); void incrementHours(); bool equalTime(const clockType& other) const; private: int hr; int min; int sec; }; //------------------------ clockType class function implementation void clockType::setTime(int i, int j, int k){ hr = i; min = j; sec = k; } void clockType::setH(int h){ hr = h; } void clockType::setM(int m){ min = m; } void clockType::setS(int s){ sec = s; } void clockType::getTime(int& i, int& j, int& k)const{ i = hr; j = min; k = sec; } int clockType::getH() const{ return hr; } int clockType::getM() const{ return min; } int clockType::getS() const{ return sec; } void clockType::printTime() const{ cout  

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 Output: ollowing are outputs from the base class clockType! he time is: 10 :23:11 The time is: 2: 23 12 ollowing are outputs from the derived class extclockType! he time is: 11:12: 13 Time Zone: 16 he time is: 14 1516 Time Zone: 20 The time is: 12:12 13 Time Zone: 11 The time is: 15 :15:16 Tine Zone: 21 ress any key to continue

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!