Question: 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 8 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 (3) attempts and is then locked out the program ends). At the end of main, add your Test Cases (10 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. 1. Request a password from the user 1. 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 (3) attempts have been made. b. If the password is valid, output the password and that it is valid and end the program. 2. The user is allowed three (3) 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 (10%): Below main as comments using the template one the next page. references: String Class (Chapter 10.7- page 591), isdigit, isupper, islower - page 558, myString.at(x)- page 598 myString.length()- page 599Test Case Template (include as a comment section below main): Engineer Name: Your Name Project/program description: A description of the program and operation (what does it do?) Test Case #1: describe the test Results: Test Case #2: describe the test Results: Test Case #3: 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 (8) characters, including at least one number, at least one upper case letter, and at least one lower case letter. Password: 1 uppermissing 1 uppermissing is not a valid password. It does not contain an upper case letter. Enter a password that contains: At least eight (8) characters, including at least one number, at least one upper case letter, and at least one lower case letter. Password:Invalid Entry 2 items missing Enter a password that contains: At least eight (8) 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 (8) 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 : 298.196 s rocess returned 0(0x0) Press any key to continue.Valid Entry Enter a password that contains: At least eight (8) characters, including at least one number, at least one upper case letter, and at least one lower case letter. Password: UpperLower34 Upper Lower34 is a valid password execution time : 10.396 s Process returned o (Oxo) Press any key to continue.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!