Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ programming C++ programming Exceptions In a prior lab, you input passwords and tested them against these criteria: 1) 2) 3) 4) At least eight

C++ programming

C++ programming

image text in transcribed

Exceptions In a prior lab, you input passwords and tested them against these criteria: 1) 2) 3) 4) At least eight characters long Contains at least one numeric digit Contains at least one upper case and at least one lower case letter Contains one of these special characters: !@#$46*: ; 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 Challenge Your program probably reports only the first error discovered in the password. Restructure your try throw-catch code to discover and report all errors

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions