Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using IntelliJ or the IDE of your choice, create a new Java application called PasswordCheckerMK2. This application is an improvement of the previous assignment -
Using IntelliJ or the IDE of your choice, create a new Java application called "PasswordCheckerMK2". This application is an improvement of the previous assignment - PasswordChecker. For this assignment you will be using loops improve the functionality of the password checker code: - Use a while or do-while loop to capture a string called inputPassword. - This loop should validate that the inputPassword is greater than or equal 3 characters long! - If the string is less than 3 characters then output an appropriate error message. - After the while loop, initialize two boolean variables that are designed to store the result of whether the string includes the following: - rule2 - Include at least one uppercase character - rule3 - Include at least one digit - Create a for loop to iterate over each character in the inputPassword. - In the for loop, use if statements to test whether each character is uppercase or is a digit and set the matching boolean rule to true. - After the for loop evaluate rule2 and rule3 - if rule 2 fails, provide an appropriate error message indicating password did not include an uppercase character - if rule 3 fails, provide an appropriate error message indicating password did not include a digit or number - If both rule2 and rule3 pass, then output "The provided password is valid
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