[Solved] C Programming Help Needed Program Description Add Exceptions Military Time Project Lab 5a Q37239372
c++ programming help needed:
Program Description:
Add Exceptions to your Military Time project from Lab 5a. Youwill have two exceptions to throw: BadHour and BadSeconds. Throwthe exceptions instead of using bool methods for setting values.Demonstrate the testing of your program by creating a main.cpptesting program. See example output below.
Specific Requirements:
-
Create exception classes for both BadHour and BadSeconds thateach have a private variable to hold the bad data, along with anyneeded methods.
-
Throw BadHour if the #### format is invalid (outside of therange 0000 – 2359)
-
Throw BadSeconds if the number of seconds is outside of therange 0-59
-
In main, use at least one try/catch block
-
If you were unhappy with your own code for Lab 5a, I have givenyou a starter version that you can start this lab with instead. Itcontains working versions of MilTime.h, MilTime.cpp, and Time.h. Itdoes not have a main.cpp. It is located on Canvas underMilTimeExceptionsStart.zip in the Chapter 16 Module. You do notneed to use my code – you may edit your own version and submit thatif you wish.
Be sure to test your program with several different invalidtimes to demonstrate that your exceptions work.
Grading Rubric: points:
1. Correctness (meets specification) 5
2. Design (well-constructed solution) 1
3. Validation & Verification (Testing) 2
Total: 8 points
Example output:
Enter a military time in the format #### and then the number ofseconds:2514 182514 is an invalid number for military time.Enter a military time in the format #### and then the number ofseconds:2200 6767 is an invalid number of seconds.Enter a military time in the format #### and then the number ofseconds:0018 13
Success! That time equates to 12:18:13
Press any key to continue . . .
Expert Answer
Answer to c++ programming help needed: Program Description: Add Exceptions to your Military Time project from Lab 5a. You will hav… . . .
OR

