Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ITEC243 - Lab 10-Task 2 Time24 hour:int minute:int Time24 int=0,int=0) Normalize Time():void AddTimelint):void ReadTime():void WriteTime():void GetHour():int GetMinute():int operator++():void operator--():void Time24 operator+Time24 ): Time24 NormalizeTime() method

image text in transcribed
image text in transcribed
ITEC243 - Lab 10-Task 2 Time24 hour:int minute:int Time24 int=0,int=0) Normalize Time():void AddTimelint):void ReadTime():void WriteTime():void GetHour():int GetMinute():int operator++():void operator--():void Time24 operator+Time24 ): Time24 NormalizeTime() method should covert hour and minute to standardized format. hour - The first output hour will always be on a 24-hour clock, and will always be two digits, 00-23. o 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. 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

Students also viewed these Databases questions

Question

9. Describe the characteristics of power.

Answered: 1 week ago

Question

3. An overview of the key behaviors is presented.

Answered: 1 week ago

Question

2. The model is credible to the trainees.

Answered: 1 week ago