Question: Background For some reason, the U.S. military has been getting their time as the number of hours (double) or as the number of minutes (unsigned




Background For some reason, the U.S. military has been getting their time as the number of hours (double) or as the number of minutes (unsigned int) as the time elapsed from 00:00. Your task as their software engineer is to convert these measurements to a more readable format. More specifically, your task is to implement an overloaded function to convert either of these types of inputs to military time. Put simply, military time displays the hour count (0-23 inclusive) followed by the minute count (0-59 inclusive). If either the hour count or minute count is less than 10 (i.e., a single digit), you will need to prepend a 0 to it in your final answer. Assignment Prompt You are writing a program to convert a time measurement (can be minutes provided as integers or hours provided as doubles) to the time in the day (24 hours). Return the time in the format "hour":"minute". Note that if your minute and/or hour count is less than 10, you will need to prepend a 0 (i.e., 14:9 should be 14:09) as if you were reading the time on a digital clock displaying military time. For example, ToMilitaryTime(8.4) = "08: 24" OR ToMilitaryTime (389) = "06:29". When a double (representing the number of hours passed), round the time to the nearest minute using round () (#include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
