Question: write in c++ Exercises (30) 1. Given the ADT Time specification below design, implement, and test the member functions as indicated. Use a loop in

write in c++
write in c++ Exercises (30) 1. Given the ADT Time specification below

Exercises (30) 1. Given the ADT Time specification below design, implement, and test the member functions as indicated. Use a loop in your test function that includes calls to tick() and printStandard to illustrate correct handling of minute and hour changes. Example output is shown below. Il time. #ifndef__TIME04 #define_TIME04_ class Time // Time abstract data type (ADT) private: int br: 11 hour - 0..23 (24-hour clock format) int min: // minute - 0..59 int sec; // second - 0..59 public: // default stec sets data members to zero, ensures consistent state Time(); Time(int n, int m, int s); // parameterized stec - calls setTime() // setTime() sets Time value using universal time; performs validity // checks on data values, replaces invalid values with zero void setTime(int n, int m, int *); void setHr(int h); // sets bry with validation void setMin(int m); // sets min, with validation void setSes(int s); // sets secs with validation int getSese) const; // return second value int getMin.) const; // return minute value int getirl) const; // return hour value void ecintuniversall) const; // print universal time format void printStandard) const; // print standard time format void tick(); // increments time one second, ensures consistent state #endif /* Example output: Universal time (default): 00:00:00 Standard time (default): 12:00:00 AM "16 bells" Universal time: 16:00:00 Standard time: 4:00:00 PM

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!