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.

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

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 Computer Engineering Questions!