Question: Imagine you are developing a software package that requires users to enter their own passwords. Your software requires that users passwords meet the following criteria:

Imagine you are developing a software package that requires users to enter their own passwords. Your software requires that users passwords meet the following criteria:

The password should be at least six characters long.

The password should contain at least one uppercase and at least one lowercase letter.

The password should have at least one digit.

Write a program that asks for a password and then verifies that it meets the stated criteria. If doesnt, the program should display a message telling the user why.

It's also telling me to use this source code:

// Chapter 10, Programming Challenge 12: Password Verifier #include using namespace std; // Global constants const int SIZE = 80; // The maximum size of the array const int MIN = 6; // The minimum number characters // Function prototypes bool hasLength(char[]); bool hasLower(char[]); bool hasUpper(char[]); bool hasDigit(char[]); int main() { char cstring[SIZE]; // To hold the password // Display the password requirements. // Get the password as input from the user. cout << "Enter a password: "; cin.getline(cstring, SIZE); // Display a message indicating whether // or not the password is valid. return 0; } //************************************************* // The hasLength function returns true if the * // string contains the minimum amount of * // characters. Otherwise, it returns false. * //************************************************* bool hasLength(char str[]) { bool status = false; // The status flag, set to false // Return the status. return status; } //************************************************* // The hasLower function returns true if the * // string contains at least one lowercase * // character. Otherwise, it returns false. * //************************************************* bool hasLower(char str[]) { bool status = false; // The status flag, set to false // Return the status. return status; } //************************************************* // The hasUpper function returns true if the * // string contains at least one uppercase * // character. Otherwise, it returns false. * //************************************************* bool hasUpper(char str[])

{ bool status = false; // The status flag, set to false // Return the status. return status; } //************************************************* // The hasDigit function returns true if the * // string contains at least one digit * // character. Otherwise, it returns false. * //************************************************* bool hasDigit(char str[]) { bool status = false; // The status flag, set to false // Return the status. return status; }

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!