write both an algorithm and a C++ program that implements a password validation

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Program statement: You are required to write both an algorithm and a C++ program that implements a password validation. Your program mainly should contain two stages; the first one is the creation of a new password, while creating the new password your program should checks strength of the password using the following rules: 1. Password length should be 6 characters. 2. Password should not contain any space. 3. Password should contain at least one digit (0-9). 4. Password should contain at least one lowercase letter (a-z). 5. Password should contain at least one uppercase letter (A-Z). 6. Password should contain at least one of the special character (#, %, &,!, $). After applying the above rules and the password is correctly inserted, your program should prompt the user to confirm the password by retyping it again, otherwise the default password that initially defined should be considered. The second stage of the program is the user login to check authorization, in this part only three trials should be granted to the user to guess the predefined password and insert it correctly, otherwise a proper message should be displayed on the screen preventing the user from another inputs. Program layout: Write a menu driven C++ program that displays the following menu to the user: 1. Admin mode: Setup your password 2. User mode: try guessing the password 3. Exit. Please enter your choice Number: The program then accepts an input choice from the user. The program acts based on the input choice as follows: Choices 1 and 2: The program should execute the above described programs respectively. Choice 3: The program should terminate. The menu should appear continuously (as infinite loop) to the user until choosing the choice.
67%
Your output should appear like the following example run instance:
When the admin mode is chosen:
Admin mode: Setup your password
User node: try guessing the password
Enit
Please enter your choice number :
You are making your password
1.
2.
3.
4.
5.
6.
insert the new password
Pas#12
Your password is strong...
Confirm it : Pas#12
Vour Password is set.
1- Admin mode: Setup your password
2- User mode: try guessing the password
3T以9-E
Please enter your choice number :
Password should not contain any space.
Password should contain at least one digit(e-9).
Password length should be 6 characters.
Passuord should contain at least one lowercase letter(a-z).
Password should contain at least one uppercase letter(A-Z).
Password should contain at least one of the special character (#, %, &, !, $).
When user mode is chosen and incorrect password was enteredE
1- Admin mode: Setup your password
2- User modet try guessIng the password
B-Exit
Clease enter your choice number
**********************
velcome to Authorization checken ***
You have oly three trials
77
Congratu tions .. the passuord is correct
1- Admdn ode: Setip your passuord
2- USer mode: try guessing the password
-Exdt
Please eent.er your choice number:
Transcribed Image Text:67% Your output should appear like the following example run instance: When the admin mode is chosen: Admin mode: Setup your password User node: try guessing the password Enit Please enter your choice number : You are making your password 1. 2. 3. 4. 5. 6. insert the new password Pas#12 Your password is strong... Confirm it : Pas#12 Vour Password is set. 1- Admin mode: Setup your password 2- User mode: try guessing the password 3T以9-E Please enter your choice number : Password should not contain any space. Password should contain at least one digit(e-9). Password length should be 6 characters. Passuord should contain at least one lowercase letter(a-z). Password should contain at least one uppercase letter(A-Z). Password should contain at least one of the special character (#, %, &, !, $). When user mode is chosen and incorrect password was enteredE 1- Admin mode: Setup your password 2- User modet try guessIng the password B-Exit Clease enter your choice number ********************** velcome to Authorization checken *** You have oly three trials 77 Congratu tions .. the passuord is correct 1- Admdn ode: Setip your passuord 2- USer mode: try guessing the password -Exdt Please eent.er your choice number:
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY