Question: Question 6- Implement a class called Time that has separate int member data for hours, minutes and seconds. One constructor should initialize this data
Question 6- Implement a class called Time that has separate int member data for hours, minutes and seconds. One constructor should initialize this data to 0, and another should initialize it to fixed values. A member function should display it in 11:59:59 format. A member function named add() should add two objects of type time passed as arguments. A main () program should create two initialized values together, leaving the result in the third time variable. Finally it should display the value of this third variable.
Step by Step Solution
3.40 Rating (153 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
