Question: Exceptions Using C++ In a prior lab, you input passwords and tested them against these criteria: 1) At least eight characters long 2) Contains at

Exceptions Using C++ In a prior lab, you input passwords and tested them against these criteria: 1) At least eight characters long 2) Contains at least one numeric digit 3) Contains at least one upper case and at least one lower case letter 4) Contains one of these special characters:

!@#$%&*:;

Each criterion was tested in a separate function. Extend your program to manage password errors with try-throw-catch statements. Add a class of exception objects, with these members: member variable enumerated data type, with values corresponding to the four error types Constructor creates an object corresponding to error type member function returns a string describing the error Extend your password program as follows: In each function, construct and throw an object corresponding to the error that just occurred In the main program, embed catch all exceptions and display a message describing the error

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!