Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Time 24 hour:int minute:int Time24(int=0,int=0) Normalize Time():void AddTime(int):void ReadTime():void Write Time():void GetHour():int GetMinute():int operator++():void operator--():void Time 24 operator+(Time 24 ):Time 24 O . NormalizeTime() method

image text in transcribed

Time 24 hour:int minute:int Time24(int=0,int=0) Normalize Time():void AddTime(int):void ReadTime():void Write Time():void GetHour():int GetMinute():int operator++():void operator--():void Time 24 operator+(Time 24 ):Time 24 O . NormalizeTime() method should covert hour and minute to standardized format. o hour - The first output hour will always be on a 24-hour clock, and will always be two digits, 00-23. minute - will always be two digits, 00-59. AddTime() method should receive minute value as parameter and add it to the minute value of the object. After addition time should be normalized as explained above. ReadTime() method should ask user to enter hour and minute from keyboard. WriteTime() method should print time in the following format. o If hour 23 57 Changing data members of time 24 object Time will increase by 2 minutes at each step The Time is --> 23:57 The Time is --> 23:59 The Time is --> 00:01 The Time is --> 00:03 The Time is --> 00:05 The Time is --> 00:07 Time will decrease by 3 minutes at each step The Time is --> 00:09 The Time is --> 00:06 The Time is --> 00:03 The Time is --> 00:00 The Time is --> 23:57 The Time is --> 23:54 The value of t1 is : The Time is --> 23:51 Enter hour/minute for t2 --> 12 48 Display the values of t3 = t1 + t2 The Time is --> 12:39 */

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions