Question: In C++ Write a program which asks the user for a password, validates the password, then reverses the password characters and re-validates the reversed password.

In C++

Write a program which asks the user for a password, validates the password, then reverses the password characters and re-validates the reversed password. Messages will be displayed to the user as to whether the password and reversed password are valid or not.

Declare in main a C-String exactly large enough to hold a 30 character password.

The program will have three programmer-created functions:

1) the user will enter the password into the C-String (see passwords below).

2) the password will be validated, according to these four criteria:

-at least 6 characters long.

-contains at least one uppercase letter, and contains at least one lowercase letter.

-contains at least one digit.

Validation messages will be stored in a dynamically allocated C-String which will be returned to main; the messages will either describe each of the errors contained in the password, or will inform the user that the password is acceptable.

3) the characters in the original password C-String will be reversed, in the original C-String; the reversed password will then be validated using function #2 which will return its C-String of messages to main.

After each execution of function #2, the password and corresponding messages will be displayed in main.

Provide three screen prints using the passwords below:

-Old MacDonald had 1 farm

-old macdonald had a farm

-!?&&&

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!