Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions