Question: Description ( CPP ) Please design a class Time represent a specific time point at a day. Class Time content a default constructor that set

Description (CPP)
Please design a class Time represent a specific time point at a day.
Class Time content a default constructor that set time to 00:00:00
Class Time content a constructor that take a string(in hh:mm:ss format) as parameter to construct the object.
Please provide a function toString that return a string representing the time in hh:mm::ss format.
Please overload operator - that operate between two Time object and return the difference in second in int type.
Input
none
Output
none
Sample Input 1
00:08:43
18:22:52
Sample Output 1
00:08:43
18:22:52
65649
Description ( CPP ) Please design a class Time

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 Programming Questions!