Create two classes to handle time of day and a program to test these classes
1) The main (parent) class must be able to:
A. Accept times in either AM/PM form or 24 clock form (no AM/PM)
i. 11:55 AM
B. Add hours, minutes, and seconds to a time
C. Take the difference between two times as a time object
D. Display times in formats shown in A above or any others that you think are interesting.
2) The child class should take times in 24 hour form (1355) and also, by default, display times in this form.
3) The classes should include (only include those items in the child class that perform differently from the same items in the parent class):
B. Set Functions
C. Get Functions
D. Overloaded Operators for:
i. Adding minutes to time
ii. Taking differences between two times
iii. Assigning a value to a time
iv. Casting a time to a string
E. Overloaded ostream << and istream >> (see my DateClass code)
F. Additional functions as required
4) The test program should demonstrate most (if not all) of these capabilities.
5) You should submit 5 files (you can compress these into one ZIP file and submit that file):
A. Two Header files (.h), one for each class.
B. Two Code files (.cpp), one for each class
C. Test File (includes main and is a .cpp)
The assignment also contains a word document containing the code for a DateClass with a child class of Eurodate that I created. These classes contain equivalent functionality for you to review and use as a template (if you wish).
If you have any questions, please email them to me.
Please note that though you need both classes to get an A, submitting a complete parent class could get you a B. If the program does not compile, that is an immediate 20 point deduction. Please make sure that you comment your code extensively (see my example). I will take off points for lack of comments, poor indentation, and other style issues.Attachments