Question: Write a program in C++ please 1. Complete the implementation of the class time24 as declared in the program time24.h. Do not modify the main

 Write a program in C++ please 1. Complete the implementation ofthe class time24 as declared in the program time24.h. Do not modify

Write a program in C++ please

1. Complete the implementation of the class time24 as declared in the program time24.h. Do not modify the main program. You must write the four methods of the class and the two functions write() and add(). Declaration of Class Time24 /* File: time24.h the class time 24 represents time on 24 hour clock times are written to a stream in the form hour: minute when two times are added the minutes are added and if the sum is 60 or more then 60 is subtracted from the sum but the the hour is increased by 1. If the hour is 24 or more then 24 is subtracted from the hour. */ #ifndef TIME24 H #define TIME24 H #include using namespace std; class time24 { private: int hour; hour between 0 and 23 int minute: minute between 0 and 59 public: int gethour (void) const; return hour int getminute (void) const; return minute void sethour(int h); hour = void set minute(int m); minute = m }; void write (ostream & out, const time24 & x); prints hour: minute time24 add const time24 &x, const time24 & y); add i and y #endif /* TIME.4.1 / Implementation of Class Time 24 File: time24.cpp Implementation of class time 24 */ #include "time24.h" Methods of time 24 time 24 functions // Main Program Using Class Time 24 File: testtime24.cpp Application program using class time 24 Date: +/ // test the class Programmer: your name #include "time 24.h" int main(void) { time24 x, y, z; x.sethour (18): x.setminute (34): y.sethour (10): y.setminute (56); cout

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!