Question
Please write a C++ program to check a password and print all the violations of a secure password. Please print Congratulations! Your password is very
Please write a C++ program to check a password and print all the violations of a secure password. Please print "Congratulations! Your password is very secure!" if there is no violation found for this password.
All the possible 10 violations are as follows:
- Your password is not secure since it has less than 2 upper-case letters.
- Your password is not secure since it has less than 2 lower-case letters.
- Your password is not secure since it has less than 7 characters.
- Your password is not secure since it has less than 2 digits.
- Your password is not secure since it has more than 12 characters.
- Your password is not secure since it contains space.
- Your password is not secure since it contains only digits.
- Your password is not secure since it contains only alphabets.
- Your password is not secure since it contains none of 6 special symbols: $ % @ ! ? *
- Your password is not secure since it contains 2020, 2019, 2018, or 2017.
You must test your program 3 times with outputs of 3 test cases shown on your report. The output of your test case #1 must look as follows:
Welcome to the program of "your name"
Please enter a password (Enter q to quit): a b
The password you just entered is a b
Your password is not secure since it has less than 2 upper-case letters.
Your password is not secure since it has less than 7 characters.
Your password is not secure since it contains space.
Your password is not secure since it has less than 2 digits.
Your password is not secure since it contains none of 6 special symbols: $ % @ ! ? *
Your password has the above 5 problems to be fixed.
Please enter a password (Enter q to quit): 2020
The password you just entered is 2020
Your password is not secure since it contains 2020, 2019, 2018, or 2017.
Your password is not secure since it has less than 2 lower-case letters.
Your password is not secure since it has less than 2 upper-case letters.
Your password is not secure since it has less than 7 characters.
Your password is not secure since it contains only digits.
Your password is not secure since it contains none of 6 special symbols: $ % @ ! ? *
Your password has the above 6 problems to be fixed.
Please enter a password (Enter q to quit): PW$2015ok
The password you just entered is PW$2015ok
Congratulations! Your password is very secure!
Please enter a password (Enter q to quit): MrLo1234
The password you just entered is MrLo1234
Your password is not secure since it contains none of 6 special symbols: $ % @ ! ? *
Your password has the above 1 problems to be fixed.
Please enter a password (Enter q to quit):
The password you just entered is
Your password is not secure since it has less than 2 lower-case letters.
Your password is not secure since it has less than 2 upper-case letters.
Your password is not secure since it has less than 7 characters.
Your password is not secure since it contains space.
Your password is not secure since it has less than 2 digits.
Your password is not secure since it contains none of 6 special symbols: $ % @ ! ? *
Your password has the above 6 problems to be fixed.
Please enter a password (Enter q to quit): Password123OK$
The password you just entered is Password123OK$
Your password is not secure since it has more than 12 characters.
Your password has the above 1 problems to be fixed.
Please enter a password (Enter q to quit): q
Thank you for playing this PASSWORD game. Hope to see you again!
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