Question
Write a program in C++ that will check a new password and make sure its valid. The program will start by asking the user to
Write a program in C++ that will check a new password and make sure its valid. The program will start by asking the user to enter his/her full name (the full name must be stored in one string variable), and then his/her login ID (also a string variable). Then the program asks the user to enter a new password and validates it.
Here is the criteria for valid passwords:
-Must contain at least 8 characters
-Must contain at least one character from three of the following four categories:
Uppercase letters (A Z), lowercase letters (a z), numbers (digits 0 9), non-alphabetic characters (for example: @ # $ % ^ & * - + = | \ { ] ? / etc.)
-Must not contain any of following:
The users login ID, the users first or last name, or the users initials (defined as the first name initial followed by the last name initial)
If the password entered by the user meets the all criteria the program lets the user know that the password has been changed. If the password entered does not meet at least one of the criteria, the program issues an error message and ask the user to try again (as many time as needed unti lthe user provides a valid password).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started