Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C + + Programming: Requirements - working with the String Class and Test Cases Using the String Class, design, develop, and test a password validation
C Programming: Requirements working with the String Class and Test Cases Using the String Class, design, develop, and test a password validation program that requests a password from the user, and validates it based on the following criteria. The password must be at least characters long, contain at least one number, and at least one upper case letter, and at least one lower case letter. The user is limited to three attempts and is then locked out the program ends At the end of main, add your Test Cases points as comments in the code see below Required functions called from main and located in a header file: prompt for and getting input, and validating the password. The main loop can be in main. Request a password from the user a Test to see if the password entered is valid length upper case, lower case, digit If the password is not valid: i Output the original password entered ii Output that it is not a valid password iii. Output each of the reasons why the password is not valid iv Then prompt again for a password start over unless three attempts have been made. b If the password is valid, output the password and that it is valid and end the program. The user is allowed three tries to enter a valid password. After three failed attempts, output that the session has been "locked" and end the program. Required functions: getting input, and validating the password. The program must use the string class, not cstring. Main should only contain the variable declarations, program loop, and calls to functions for getting the input, validating the password, and showing output. Test Cases : Below main as comments using the template one the next page. references: String Class Chapter page isdigit, isupper, islower page myString.atx page myString.length page Test Case Template include as a comment section below main: Engineer Name: Your Name Projectprogram description: A description of the program and operation what does it do Test Case #: describe the test Results: Test Case #: describe the test Results: Test Case #: describe the test Results: Test Case #n: describe the test Results: Test your program before submission and document the test cases as comments below main. Invalid Entry Enter a password that contains: At least eight characters, including at least one number, at least one upper case letter, and at least one lower case letter. Password: uppermissing uppermissing is not a valid password. It does not contain an upper case letter. Enter a password that contains: At least eight characters, including at least one number, at least one upper case letter, and at least one lower case letter. Password:Invalid Entry items missing Enter a password that contains: At least eight characters, including at least one number, at least one upper case letter, and at least one lower case letter. Password: LOWERANDNUMBERMISSING LOWERANDNUMBERMISSING is not a valid password. It does not contain a lower case letter. It does not contain a number. Invalid Entry third attempt Enter a password that contains: At least eight characters, including at least one number, at least one upper case letter, and at least one lower case letter. Password: thirdAttempt thirdAttempt is not a valid password. It does not contain a number. That was the third attempt. This session has been locked. execution time : s rocess returned x Press any key to continue.Valid Entry Enter a password that contains: At least eight characters, including at least one number, at least one upper case letter, and at least one lower case letter. Password: UpperLower Upper Lower is a valid password execution time : s Process returned o Oxo Press any key to continue.
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