Uncategorized
What you will do, is design a class called MilTime
In this program, you are given a header file called “Time.h” which defines and declares the the “Time” class.
What you will do, is design a class called MilTime that is derived from the Time class. The MilTime class should convert time in military (24-hour) format to the standard time format used by the Time class.
- Class Requirements:
- The class should have the following member variables:
milHours– Contains the hour in 24-hour format. For example 1:00pm would be 1300.milSeconds– Contains the seconds in standard format.
- The class must have the following member functions:
Constructor: a parametered constructor should accept arguments for the hour and seconds, in military format. The time should then be converted to standard time and stored in the hours , min, and sec variables of the Time class.setTime: Accepts arguments to be store in the milHours and milSeconds variables. The time should then be converted to standard time and stored in the hours, min and sec variables of the Time class.getHour: Returns the hour in military format.getStandHr: Returns the hour in standard format.- NOTE: Using input Validation, The MilTime class should not accept hours greater than 2359, or less than 0. It should not accept seconds greater than 59 or less than 0.
- The class should have the following member variables:
The post What you will do, is design a class called MilTime appeared first on My Assignment Online.
