Question: Laboratory Assignment Program 1 // File Time.h class Time public: int hour; // current hour in military time int minute; // current minute in military

 Laboratory Assignment Program 1 // File Time.h class Time public: int
hour; // current hour in military time int minute; // current minute
in military time int second; // current second in military time //
set the time to the time specified by the parameters void setTime
(int newhour, int newMinute, int newSecond); // return the time to the

Laboratory Assignment Program 1 // File Time.h class Time public: int hour; // current hour in military time int minute; // current minute in military time int second; // current second in military time // set the time to the time specified by the parameters void setTime (int newhour, int newMinute, int newSecond); // return the time to the calling method using the provided 1/ parameters void getTime (int& currhour, int& currMinute, int& currSecond); // increment the current time by one second void increment Time (void); // file Time.cpp #include #include "Tine.h" using nanespace std; const int MAX_HOURS-23; const int MAX_MIN_SECS - 59; void Time: : setTime (int newhour, int newMinute, int newsecond) hour = newHour; minute - newMinute; second - newSecond; void Time::getTime (ints curr Hour, ints currMinute, int& curr Second) currHour hour; curr Minute - minute; curr Second - second; void Time::increment Tine (void) ++Second; // file main.cpp include #include #include "Time.h" using namespace std; int main(void) Time currTime; // object that stores the current time int hr; // current hour obtained from currTime int min; // current minute obtained from currTime int sec; // current second obtained from currTime currTime.setTime(20, 15, 43); currTime.getTime(hr, min, sec); cout = 88 newHour (MAX_HOURS) hour = newHour; else 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!