Question: Do not use arrays. Design and implement a Java program (name it Password). In the program, design a method (name it CheckPassword) that takes a

Do not use arrays. Design and implement a Java program (name it Password). In the program, design a method (name it CheckPassword) that takes a password as a parameter, determines whether the password is valid or invalid using the following rules. Then it returns the outcome as boolean value (true or false).

The rules are:

- Password must include at least 10 characters - Password contains only letters and digits - Password must include at least 3 digits

Use three additional boolean methods, one for each stated rule above, to check if that rule is met or not. A boolean method returns a boolean value. A password is valid if all three rule methods return true values, otherwise the password is invalid. Design the program main method such that it allows the user to re-run the program with different inputs (as we did in the previous assignment using a sentinel loop structure). Document your code and organize the outputs properly using escape characters. In the main method, ask the user to enter a password and then display the judgement Valid Password or Invalid Password. Sample runs are:

Enter a password: CS5000/01 Entered password: CS5000/01 Judgment: Invalid Password

Enter a password: CS5000 Entered password: CS5000 Judgment: Invalid Password

Enter a password: CS5000Section01 Entered password: CS5000Section01 Judgment: Valid Password

Enter a password: MyOldK9Dog Entered password: MyOldK9Dog Judgment: Invalid Password

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!