Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 Pile: time24.1 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 time 24 l private: int hour; int minute: 7 hour between 0 and 28 minute between 0 and 59 public int get hour (void) const; int getminute (void) const; void set hour(int h); void set minute(int m) return hour return minute hour - minute - prints honr: minute add and y void write (ostream& out, const time24 time24 add(const time 24 &x, const time24 & y); #endif /* TIME24-H ./ Implementation of Class Time24 File: time24.cpp Implementation of class time 24 / #include "time24.h" Methods of time24 time 24 functions Main Program Using Class Time 24 A Pile: testtime24.cpp Application program wsing class time 24 Programmer: your name Date: #include "time24.h" int main(void) // test the class time24 x, y: 2; X. sethour (18): X. set minute (34) y.sethour (10); y.setminute (56) cout
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started