Question
please help me out and input values please .. main cpp.. please follow intructions exactly witj clarity please
CSE 110-Intro to Computer Programming Project #3 Requirements-String Class Functions and Test Case Documentation Using the St
Jexecute/content/file?cmd =view&content id-_1613034 18course_id=_35000_1 Verify the second entry-prompt the user to re-enter
CSE 110-Intro to Computer Programming Grading will be based on meeting all of the lab requirements, adherence to coding stand
Who + Block (1) Th Const Install Netflix G C++ Data M Inbox olackboard/execute/content/file?cmd-view&content id 1613034 1&cou
ackboard/execute/content/file?cmd=view& Computer Programming CSE 110-Intro to Invalid Entry-2 items missing Enter a password
Block Who (1) Th Netflix x Const Install G C++ P ontent/file?cmd =view&content id=_1613034 1&course id- 35000_1 Enter a passw
image.png
d/execute/content/file?cmd=view&content_id=_1613034_1&course id Entry Confirmed password that contains: Enter a At least eigh
CSE 110-Intro to Computer Programming Test Case Document: A test case/results document is required for this project (10% of g
elackboard/execute/content/file?cmd=view&contént id- Engineer Name: Your Name Project/program description: A description of t
CSE 110-Intro to Computer Programming Project #3 Requirements-String Class Functions and Test Case Documentation Using the String Class, design and develop a multi-file password validation program and Test case Document (10% of grade) that requests a password, 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. a. The user is limited to three (3) attempts and then is locked out and the program ends. Required functions called from main and located in a header file: prompt for and getting input, validating the password, re-entry (confirming), and output. The main loop can be in main. Request a password from the user 1. Test to see if the password entered is valid (length, upper case, lower case, digit) 2. If the password is not valid a. i Output the original password entered Output that it is not a valid password il. 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. If the password is valid, output that it is valid, and request that it be re-entered for verification Verify the second entry-prompt the user to re-enter the password for validation the second entry does not match the first, output that they don't match Pse 1P
Jexecute/content/file?cmd =view&content id-_1613034 18course_id=_35000_1 Verify the second entry-prompt the user to re-enter the password for validation i. If the second entry does not match the first, output that they don't match, c. display the two (2) passwords in quotes, and prompt for another initial password (start over), unless three (3) attempts have been made. ii. If the second entry matches the first, output that the valid password has been approved, and end the program. The user gets three (3) tries to enter a valid password. After three failed attempts, output that 3. the session has been "locked" and end the program. Required functions: getting input, validating the password, re-entry confirmation, and output Main should only contain the variable declarations, program loop, and function calls for getting the input, validating the password, verifying the second entry, and showing output. Required Test Case document: Determine Test cases for the program and document them String Class (Chapter 10.7-page 591), Lab references: isdigit, isupper, islower- page 558, myString.length()-page 599 cSE 110-Intro to Computer Programming
CSE 110-Intro to Computer Programming Grading will be based on meeting all of the lab requirements, adherence to coding standards as covered in class, operation of the program and accurate output, and programming style (white space, comments, variable names, functions names, naming conventions, indentation, etc.). Example Screen captures: Prompt 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 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. 1meer
Who + Block (1) Th Const Install Netflix G C++ Data M Inbox olackboard/execute/content/file?cmd-view&content id 1613034 1&course id-35000 1 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 upperaissing 1 upperaiosing 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
ackboard/execute/content/file?cmd=view& Computer Programming CSE 110-Intro to Invalid Entry-2 items missing Enter a password that contains: At least eight (8) characters, including at least one number. at least one upper caoe letter. and at least one lower case 1etter. LOWERANDNUMBERMISSING Password: LOWERANDNUMBERMISSING is not a valid pasSHord. It does not contain a lower case letter. It does not contain a number. Invalid Entry-third attempt Enter a password that contains et least eisht () char acters. ineluding at least one nusber at least one upper case lettb and at least one lowsr case letter Passwords thirdittespt thirettenpt is not a valie password It dees nat contain a nusber That was the thare attespt This session has bean locked 2222 bracess returned (vt) eution tiee 29 16 8
Block Who (1) Th Netflix x Const Install G C++ P ontent/file?cmd =view&content id=_1613034 1&course id- 35000_1 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: GoodPassword1 GoodPassword1 is a valid password Re-enter the password for validation: - Intro to Computer Programming ntry Not Confirmed Enter a password that contains At least eight (8) characters. including

d/execute/content/file?cmd=view&content_id=_1613034_1&course id Entry Confirmed password that contains: Enter a At least eight (8) characters, including at least one number, at least one upper case letter, and at least one lower case letter. GoodPassword Password: GoodPassword1 is a valid password Re-enter the password for validation: GoodPassword 1 The passuord has been approued. Process returned 0 (ex0) Press any key to continue. execution time 88.203 G CSE 110-Intro to Computer Programming
CSE 110-Intro to Computer Programming Test Case Document: A test case/results document is required for this project (10% of grade). What is a Test case? A test case describes input, action, and an expected response, in order to determine if a feature or requirement of an application is working correctly A test case is a set of instructions on "HOW" to validate a particular test objective/target, which when followed will determine if the expected behavior of the system is satisfied or not. Template: 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 Roculte CO
elackboard/execute/content/file?cmd=view&contént id- 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 #4: describe the test Results:
0 0
Add a comment Improve this question Transcribed image text
Answer #1


Please let me know if you have any doubts or you want me to modify the answer. And if you find this answer useful then don't forget to rate my answer as thumps up. Thank you! :)


#include <iostream>
#include <string>
#include <iomanip>

using namespace std;

void prompt_input();

void get_input(string& userPassword);

void validate_Password(string userPassword, bool& correct_Password);

bool user_Validate(string userPassword, string& userPassword2);

void attempts_reached();

int main()
{
    string userPassword;
    string userPassword2;
    bool correct_Password = false;
    int attempts = 3;

    prompt_input();

    while (attempts > 0 && correct_Password == false)
    {

        if (attempts > 0 && correct_Password == false)
        {
            get_input(userPassword);
            validate_Password(userPassword, correct_Password);
            attempts--;
        }

        if (attempts == 0 && correct_Password == false)
        {
            attempts_reached();
        }

        if (correct_Password == true)
        {
            user_Validate(userPassword, userPassword2);
        }
    }

    return 0;
}


void prompt_input()
{
    cout << endl << setw(45) << "-------------------------------------------" << endl;
    cout << setw(33) << "Enter a password that contains:" << endl;
    cout << setw(45) << "At least eight (8) characters, one number, " << endl;
    cout << setw(50) << "one upper case letter, and one lower case letter" << endl;

}

void get_input(string& userPassword)
{
    cout << endl << setw(12) << "Password: ";
    cin >> userPassword;
    cout << endl;
}

void validate_Password(string userPassword, bool& correct_Password)
{
    int index;
    int uppercase = 0;
    int lowercase = 0;
    int digit = 0;

    for (index = 0; index < userPassword.length(); index++)
    {
        if (isupper(userPassword[index]))
            uppercase++;
        if (islower(userPassword[index]))
            lowercase++;
        if (isdigit(userPassword[index]))
            digit++;
    }

    if (userPassword.length() < 8 || uppercase == 0 || lowercase == 0 || digit == 0)
    {
        cout << "      " << userPassword;
        cout << " is not a valid password." << endl;
    }
    if (userPassword.length() < 8)
    {
        cout << setw(48) << "It must be at least eight characters long." << endl;
    }

    if (uppercase == 0)
    {
        cout << setw(47) << "It does not contain an upper case letter." << endl;
    }

    if (lowercase == 0)
    {
        cout << setw(46) << "It does not contain a lower case letter." << endl;
    }

    if (digit == 0)
    {
        cout << setw(34) << "It does not contain a digit." << endl;
    }

    if (userPassword.length() >= 8 && uppercase > 0 && lowercase > 0 && digit > 0)
    {
        cout << setw(10) << userPassword;
        cout << " is a valid password." << endl;
        cout << endl << setw(38) << "Re-enter the password for validation" << endl;
        correct_Password = true;
    }

}

void attempts_reached()
{
    cout << endl <<setw(73) << ">>>>   That was the third attempt. This session has been locked.   <<<<" << endl << endl;
}

bool user_Validate(string userPassword, string& userPassword2)
{
    bool match = false;
    cout << endl << setw(12) << "Re-Entry: ";
    cin >> userPassword2;
    cout << endl;


    if (userPassword == userPassword2)
    {
        cout << setw(46) << "**** The password has been approved. *****" << endl;
        match = true;
    }

    if (userPassword != userPassword2)
    {
        cout << setw(23) << "<<<   This password '" << userPassword2 << "' does not match '" << userPassword << "'   >>>" << endl;
    }
    return match;
}
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Password [/CLion Projects/Password] /main.cpp Password main.cpp Password | Debug Project CMakeLists.txt main.con #include <io

Add a comment
Know the answer?
Add Answer to:
please help me out and input values please .. main cpp.. please follow intructions exactly witj...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write Java program: • Is at least 8 characters long • Contains at least 1 lower letter charact...

    Write Java program: • Is at least 8 characters long • Contains at least 1 lower letter character • Contains at least 1 upper letter character • Contains at least 1 numeric digit • Contains at least 1 special character from the set: !@#$%^&* • Does not contain the word “and” or the word “the” Prompts the user for a password, including the requirements above in your output. Output a string that states valid or invalid. If invalid, state which...

  • Can I please get some assistance on this? 1. Write a program to test the correctness...

    Can I please get some assistance on this? 1. Write a program to test the correctness of a password according to some rules. If the password is not valid, print messages showing what's wrong with the password. Partial program output should look like this: Please enter a password. It must be at least 8 characters long and contain at least 2 alpha characters, at least one upper case and one lower case, at least 1 numbers, and at least 1...

  • Design and implement a Java program (name it PasswordTest) that accepts a string from the user...

    Design and implement a Java program (name it PasswordTest) that accepts a string from the user and evaluates it as a password, giving it a valid or invalid verdict A good password will be at least 8 characters and includes at least one lower-case letter, at least one upper-case letter, at least one digit, and at least one character that is neither a letter nor a digit. Your program will need to check each character in the string in order...

  • 1. You are given a C file which contains a partially completed program. Follow the instructions...

    1. You are given a C file which contains a partially completed program. Follow the instructions contained in comments and complete the required functions. You will be rewriting four functions from HW03 (initializeStrings, printStrings, encryptStrings, decryptStrings) using only pointer operations instead of using array operations. In addition to this, you will be writing two new functions (printReversedString, isValidPassword). You should not be using any array operations in any of functions for this assignment. You may use only the strlen() function...

  • please use c++ please write down the input file information please add comments for some codes...

    please use c++ please write down the input file information please add comments for some codes please do not use #include <bits/stdc++.h> we did not learn it yet thank you CSIT 575-Take Home Lab #11: Arrays To learn to code, compile and run a program processing characters. Assignment Plan and code a top-down modular program utilizing ARRAYS to solve the following problem, using at least 3 functions (called from the main() section or from another function) to solve the problem....

  • ****C PROGRAMMING**** (100 points) Write a program that prompts the user to enter the name of...

    ****C PROGRAMMING**** (100 points) Write a program that prompts the user to enter the name of a file. The program encoded sentences in the file and writes the encoded sentences to the output file. Enter the file name: messages.txt Output: encoded words are written to file: messages.txt.swt The program reads the content of the file and encodes a sentence by switching every alphabetical letter (lower case or upper case) with alphabetical position i, with the letter with alphabetical position 25...

  • Programming Problem 1 - File Name: pass.cpp (5 pts.)        Description: You were hired by...

    Programming Problem 1 - File Name: pass.cpp (5 pts.)        Description: You were hired by the KFU cybersecurity team to create a program that checks if the passwords chosen by users are strong or not. A password is considered strong if the following conditions are satisfied: •   Its length is at least 8 characters •   It contains at least one uppercase letter. Input Format: The program will prompt the user to enter their chosen password. Example Input Enter your...

  • Please make this Python code execute properly. User needs to create a password with at least...

    Please make this Python code execute properly. User needs to create a password with at least one digit, one uppercase, one lowercase, one symbol (see code), and the password has to be atleast 8 characters long. try1me is the example I used, but I couldn't get the program to execute properly. PLEASE INDENT PROPERLY. def policy(password): digit = 0 upper = 0 lower = 0 symbol = 0 length = 0 for i in range(0, len(password)): if password[i].isdigit(): # checks...

  • FOR JAVA: Summary: Write a program to assess password stringency. The solution should be named Password.java....

    FOR JAVA: Summary: Write a program to assess password stringency. The solution should be named Password.java. Include these steps: Write an application that provides the criteria for a strong password, and accepts a user's password from an input dialog box. If the entered password is less than six characters, more than 10 characters, or does not contain at least one uppercase letter and one digit, prompt the user to enter again. When the user's entry meets all the password requirements,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT