Question: II default constructor // sets time to 0 hours, 0 minutes, 0 seconds TimeType() /I Second constructor which sets the time to h hours, m

 II default constructor // sets time to 0 hours, 0 minutes,0 seconds TimeType() /I Second constructor which sets the time to h

II default constructor // sets time to 0 hours, 0 minutes, 0 seconds TimeType() /I Second constructor which sets the time to h hours, m minutes, s seconds TimeTypelint h, int m, int s); // getter functions int getHours() const; int getMinutes() const; int getSeconds() const; // setter function void setTime(int h, int m, int s); // other methods void addseconds(int k); // adds k seconds to the object time void deductseconds(int k); // deducts k seconds from the object time // destructor TimeTypel) private: int _h; //holds hours int _m;// holds minutes int s;// holds seconds // This function checks for the values in _m and _s greater than 59 or // less than 0. If such values are found, the numbers stored are adjusted // to reflect a standard notation of a time duration. Examples: // 0 hours, 12 minutes, 61 seconds would be adjusted to 0 hours, 13 minutes, 1 second // 0 hours, 60 minutes, 61 seconds would be adjusted to 1 hour, 1 minute, 1 second //0 hours, 2 minutes, -2 seconds would be adjusted to 0 hours, 1 minutes, 58 seconds // Overall time must be positive. If it is negative, _h, _m, _s should be reset toO void simplify(); . Write the code for private member function simplify). . Write the code for alil 8 member methods specified in the class interface, incltuding the constructors

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!