Question
(Based on the programs: CharacterTest, StringAnalyzer, and StringAnalyzer2 in the Ch. 10 project). a) Write a java program using the Character class that verifies that
(Based on the programs: CharacterTest, StringAnalyzer, and StringAnalyzer2 in the Ch. 10 project). a) Write a java program using the Character class that verifies that a password: 1) has between 8 and 12 characters, 2) has at least 1 upper case letter, 3) has at least one lower case letter, 4) has at least one digit, and 5) has at least one of the characters @, $, %,&, * Your program should tell the person what is required of the password. The program should tell the person if the password is valid or invalid. b) Create a second program which allows a person up to three chances to log in. Pass in the above two programs. run: Enter your password which is between 8 and 12 characters in length, has at least one upper case letter, at least one lower case letter, at least one digit, and at least one of the special characters: @, $, %, &, or * Enter your password: abcdefgh Password is invalid. Enter your password: Abc1776* Password is valid.
run: Enter your password which is between 8 and 12 characters in length, has at least one upper case letter, at least one lower case letter, at least one digit, and at least one of the special characters: @, $, %, &, or * Enter your password: dog Password is invalid. Enter your password: cat Password is invalid. Enter your password: tiger Password is invalid. Your screen is locked. Try again in 5 years BUILD SUCCESSFUL (total time: 9 seconds)
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