Design and implement a Java program
Some websites impose certain rules for passwords. Write a method that checks whether a string is a valid password. Suppose the password rules are as follows:
- A password must have at least eight characters.
- A password consists of only letters and digits.
- A password must contain at least two digits.
Write a program that prompts the user to enter a password and displays Valid Password if the rules are followed or Invalid Password otherwise to verify a password according to as set of rules stated in the problem statement.
Follow the instructions in the problem statement. Use three boolean methods, one for each stated rule, to checkif that rule is met or not.
A boolean method returns a boolean value. A password is valid if all three rule methodsreturn true values, otherwise the password is invalid.
Design the test program main method such that it allowsthe user to re-run the program with different inputs ((i.e., use a loop structure).
Document your code and organize the outputs properly using escape characters.