Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Download: http://solutionzip.com/downloads/passwordverifier-java/
- Implement a program that reads in a user password and verifies it meets the following criteria:
- Is at least 8 characters long
- Contains atleast 1 lower letter character
- Contains atleast 1 upper letter character
- Contains atleast 1 numeric digit
- Contains atleast 1 special character from the set: !@#$%^&*
- Does not contain the word “and” or the word “end”
- Output a string that prompts the user for a password and include the requirements above in your output.
- Output a string that states valid or invalid. If invalid, state which rule above has not been met.
- Utilize the following functionality:
- • indexOf
- • Looping structure
- • charAt()
- • isDigit()
- • isUpperCase()
- • isLowerCase()
- • and any additional functionality needed.
- Sample Output:
- Password Verifier
- Enter a password that meets the following rules:
- Password1
- Invalid
- Missing a special character
- —————————————————————–
- Password Verifier
- Enter a password that meets the following rules:
- Panda123$
- Invalid
- Contains the string “and”
- —————————————————————–
- Password Verifier
- Enter a password that meets the following rules:
- Hi
- Invalid
- Must be at least 8 characters long
- Must contain a numeric digit
- Must contain a special character
- —————————————————————–
- Password Verifier
- Enter a password that meets the following rules:
- Pa$$word1
- Valid
- Download: http://solutionzip.com/downloads/passwordverifier-java/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement