Please me help me guys...our teacher gave us this problem in c++ and i really dont know how to solve it since i have been confined at the hospital for a week because of dengue..please help me out..


Here's the problem:


Define a class named Time to perform the conversion. Time class should have the data members hours, minutes, seconds. It should define the constructor to initialize the data members to 0.

The Following functions should be defined:

*setTime()-sets the hours,minutes,seconds values of the data members.

*toUniversalString()-displays the inputted values in hours, minutes, seconds in universal time format.

*toStandardString()-converts and displays universal time to standard time.


Initial Output:

Set The Following:

Hours: 13
Minutes: 25
Seconds: 59

Universal Time: 13:25:59 Standard Time: 1:25:59 PM

Add a feature to your Time class such that it can update the standard time to a new time. After adding hour(s),minute(s), and second(s).Use the following updateTime() to do the task.

Final Screen Output:

Set the Following:

Hours: 13
Minutes: 25
Seconds: 59

Universal Time: 13:25:59 Standard Time: 1:25:59 PM

Update Time:

Hour(s) to be added: 2
Minute(s) to be added: 3
Second(s) to be added: 1

Updated Standard Time: 3:29:00 PM

Sounds like you have some studying to do in order to make up that week in the hospital. Your text book probably covers all the material you need to do the program.

Start out very simply -- define the class.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.