Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that prompts the user for a password that contains at least two uppercase letters, at least two lowercase letters, and at least

Write a program that prompts the user for a password that contains at least two uppercase letters, at least two lowercase letters, and at least two digits. You can assume that the password entered by the user will not contain any whitespace. After the user enters a password, display a message indicating whether the user was successful or the reason the user was not successful. Save the file as ValidatePassword.java. Examples of program execution:

Enter your password, which must contain at least two uppercase letters, at least two lowercase letters, and at least two digits: Pw2 Your password (Pw2) is invalid because: - fewer than two uppercase letters - fewer than two lowercase letters - fewer than two digits Enter your password, which must contain and at least two uppercase letters, at least two lowercase letters, and at least two digits: Password1 Your password (Password1) is invalid because: - fewer than two uppercase letters - fewer than two digits Enter your password, which must contain at least two uppercase letters, at least two lowercase letters, and at least two digits: PassWord3 Your password (PassWord3) is invalid because: - fewer than two digits Enter your password, which must contain at least two uppercase letters, at least two lowercase letters, and at least two digits: P@55Word Your password (P@55Word) is valid.

 
 
 
 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems Second East European Symposium Adbis 98 Poznan Poland September 1998 Proceedings Lncs 1475

Authors: Witold Litwin ,Tadeusz Morzy ,Gottfried Vossen

1st Edition

3540649247, 978-3540649243

More Books

Students also viewed these Databases questions