Answered step by step
Verified Expert Solution
Question
1 Approved Answer
write a java code called PasswordChecker that gets a String of a single word with no white space from the user at the command line,
write a java code called "PasswordChecker" that gets a String of a single word with no white space from the user at the command line, by using the Scanner object to read input via the keyboard, and checks whether the String, called inputPassword, conforms to the following password policy. Note that no whitespace is permitted in this password string. The password must: Be exactly characters in length Include at least one uppercase character Include at least one lowercase character Include at least one digit If the password conforms to the policy, output "The provided password is valid." Otherwise, output "The provided password is invalid because it must be five characters in length and include at least one digit, at least one uppercase, and at least one lowercase character. Please try again." Some other points to remember... NO LOOPING Do not use a loop in this program. Instead, you need to access one character within the String at a time using the valid index number and charAt method.
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