Answered step by step
Verified Expert Solution
Link Copied!

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 5 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

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions