Purchase Solution

Password Verification Program in C++

Not what you're looking for?

Ask Custom Question

Imagine you are developing a software package that requires user to enter their own passwords. Your software requires that user 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 C++ program that asks for a password and then verifies that it meets the stated criteria. If it does not, the program should display a message telling the user why.

Example of it should be:

Atleast 6 characters long
At least one uppercase characters
At least one lowercase letter
At least one numeric digit
Enter a password

And if is correct it should say: the password is valid.
And is not correct it should say: the password is not valid.

Press any key to continue....

Purchase this Solution

Solution Summary

Attached implementation abstracts password verification process in a separate function verify_password, and also implements a function flush to purge input steam of any remaining characters, like newline, left after reading the password from user.

Solution Preview

Please find attached 583513.cpp containing a sample implementation of password verification as per required criteria. Please adjust various messages text as per your ...

Purchase this Solution


Free BrainMass Quizzes
Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

C++ Operators

This quiz tests a student's knowledge about C++ operators.