Question
In JAVA In this assignment we are going to validate passwords. Create a class called PasswordValidator with both a main method and a method called
In JAVA
In this assignment we are going to validate passwords. Create a class called PasswordValidator with both a main method and a method called validatePassword.
validatePassword method
Write a Java method called validatePassword that validates a password. It will return true if the password is valid, or false if not valid. [1 point]
Using the Character wrapper class, verify the password in the following way
It must be at least 6 characters[1 point]
It must start with an upper case letter [1 point]
It must contain at least one digit.[1 point]
Write Javadoc style comments for your method [1 point]
main method
Ask the user to enter a password, and then pass this password to the validatePassword method. [1 point]
Print out "Valid password" if the method returns true, else print out "Invalid password" [1 point]
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