Question: Please write the program in C++ language 1. Complete the implementation of the class time24 as declared in the program time24. cpp Do not modify

 Please write the program in C++ language 1. Complete the implementationof the class time24 as declared in the program time24. cpp Do

Please write the program in C++ language

1. Complete the implementation of the class time24 as declared in the program time24. cpp Do not modify the main program. You must write the four methods of the class and the two functions write) and add) Notes: The attributes of time24 are hour and minute This allows us to use the names hour and minute for the methods. Instead of naming the methods sethour, setminute, gethour and getminute we use overloading of the method names hour and minute . To print an integer #include using namespace std; class time24 private int hour; int minute-; // hour between 0 and 23 // minute between 0 and 59 public: int hour (void) const; int minute (void) const void hour(int h); void minute(int m) // return hour_ // return minute //hour-h / / minut.e- m void write (ostream &out, const time24 x); time24 add(const time24 &x, const time24 &); // prints hour:minute // add x and y int main(void) // test the class time24 x, y, z; x.hour (18) x.minute (34)

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!