Wyo C++ Ch7Proj1

Write a program that prompts the user to input two times of day such asand "7:34 am" and "2:15 pm". The program will compute and display the amount of time that elapses between those two times of day. Assume that both inputted time of days are for the same calendar day. If the inputs are "11:00 pm" and "1:00 am", the answer should be "22:00" and not "2:00". The output must be displayed as hours and minutes in "reduced" form. For example, the output can be in the form "6:41" or "6 hours 41 minutes" but not in the form "401 minutes" or "5 hours 101 minutes". Also, your output should not contain leading zeros such as "06:41". The user may enter the earlier time as the first input or he may enter the earlier time as the second input of the two.

You must read the two inputs from the keyboard as apstrings using the apstring class's getline function. It is recommended that you use the apstring class find function to find the colon and the blank space in each input. You may have to use a combination of type casting, if statements, string parsing, ascii table logic, switch statements, apstring subscript operators ([ ]), apstring substr function and/or other means to accomplish this task. Your algorithm should be as efficient as possible and the documentation should make your program easy for others to read.

After carefully writing out this program on paper, type it into the compiler and debug if necessary. Your program must follow the Coding Standards. Save the source code file as "Ch7Proj1.cpp" in the appropriate network folder.

Preconditions:

You must hand in the following on separate pages stapled in this specified order:

    1. The hardcopy source code for this assignment. Staple multiple pages together, if applicable.
    2. The handwritten source code that you wrote out before you typed the program into the compiler.
    3. Pseudocode that shows that you broke the problem down into specific steps. Do this BEFORE you begin writing or typing out the code.
    4. A test plan with all the boundary cases that you can think. You must include at least 10 test cases.