Question: In need of some assistance with a program. This program is in C++. I see this question is already answered in Java, but I am
In need of some assistance with a program. This program is in C++. I see this question is already answered in Java, but I am working in C++
Design a class named Time. The class must contain:
-A no-arg constructor that creates a Time object for the current time
-The data fields hour, minute, and second represent a time
-A constructor that constructs a Time object with a specified elapsed time since midnight, January 1, 1978, in milliseconds. (The values of the data fiels will represent this time)
-A constructor that constructs a Time object with the specified hour, minute and second
-Three get metherods for the data fields hour, minute and second
-A method names SetTime(long timeElapsed) that sets a new time for the object useing the elapsed tme. For example, if the elapsed time is 5555500000 miliseconds would be 10 hours, 19 minutes and 10 seconds
Write a test program that creates two Time objects (using new Time() and New Time(555550000)) and displays their hour, minute and second in the format hour:minute:second.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
