Question
Assignment Using IntelliJ or the IDE of your choice, create a new Java application called PasswordChecker. The purpose of this application is to prompt the
Assignment
Using IntelliJ or the IDE of your choice, create a new Java application called "PasswordChecker". The purpose of this application is to prompt the user for a single word string and checks whether the String, called inputPassword, conforms to the following password policy.
Use a scanner object and prompt the user for a password that is stored in a String variable called inputPassword.
You do not need to use a loop in this program. You should be able to check each character of the password individually.
Use the Character class methods to validate whether a character is a digit or an upper cased letter.
The password must conform the the policy:
Be exactly three characters in length
Include at least one uppercase character
Include at least one digit
If validation of all three rules passes then output "The provided password is valid." If any of the rules fail then output "The provided password is invalid because it must be three characters in length and include at least one digit and at least one uppercase character. Please try again."
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started