Question: could you write this in C++ Exercise L2-2 Chap 14 Exception Handling Write a program that prompts the user to enter time in 12:00:00AM thru

could you write this in C++

could you write this in C++ Exercise L2-2 Chap 14 Exception Handling

Exercise L2-2 Chap 14 Exception Handling Write a program that prompts the user to enter time in 12:00:00AM thru 11:59:59 PM (12-hour notation). The program then outputs the time in 00:00:00 thru 23:59:59 (24-hour notation). Your program must contain three exception classes: invalidHr, invalidMin, invalidSec. If the user enters an invalid value for hours, then the program should throw and catch an invalid HR object. Follow similar conventions for the invalid values of minutes and seconds. Each exception class (invalidHr, invalidMin, invalidSec) should have 2 constructors: The default constructor that supplies the standard error message and a parameterized constructor which takes a string variable to initialize the error message. Your derived exception classes should also supply the necessary overloads for returning an error message. Name the header files the same as the class name with the h file extension

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!