menu
bartleby
search
close search
Hit Return to see all results

Write a Java program that prompts the user to enter a password and checks whether it is valid according to the following rules: . A password must have at least eight characters. A password must contain only letters and digits. A password must contain at least one uppercase letter and one lowercase letter. A password must contain at least two digitsThis practice program must include at least two methods (including main).

Question

Write a Java program that prompts the user to enter a password and checks whether it is valid according to the following rules: 

. A password must have at least eight characters

. A password must contain only letters and digits

. A password must contain at least one uppercase letter and one lowercase letter

. A password must contain at least two digits

This practice program must include at least two methods (including main).

check_circleAnswer
Step 1
  • Create a main() method and a check_pass() to validate whether a password contains 8 characters or not.
  • Run a for loop which will processes each character in a loop with respect to required validations and at the same time there is 4 counters to check different parameters (number of...

Want to see the full answer?

See Solution

Check out a sample Q&A here.

Want to see this answer and more?

Our solutions are written by experts, many with advanced degrees, and available 24/7

See Solution
Tagged in

Engineering

Computer Science

Java

Related Computer Science Q&A

Find answers to questions asked by student like you

Show more Q&A add
question_answer

Q: in the program Python  Write a program that the owner of Chica Chic could use to store data about he...

A: A python program is created to store the inventory details in a text file named as inventory.txt. Th...

question_answer

Q: What language is accepted by the Turing machine whose transition graph is in the figure below?

A: Turing machine:Turing machine is a model of a hypothetical computing machine which can use a predefi...

question_answer

Q: Annotate the following MIPS instructions to indicate source registersand destination registers. A so...

A: Annotations for the MIPS instructions mentioned in the question are given below-add $s1, $t2, $t3Add...

question_answer

Q: 1

A: Different business rules are given in the question which form the entities like Volunteer, Area, Loc...

question_answer

Q: Who is Alan Turnig ?

A: Alan Turing was born in the year 1912 and died in the year 1954. He was a mathematician, computer sc...

question_answer

Q: CHALLENGE 3.17.2: Conditional assignment. ACTIVITY Using a conditional expression, write a statement...

A: numUsers is incremented if updateDirection is equal to 1, else numUsers is decremented.

question_answer

Q: rewrite the function F = (A ⊕ B) ⊕ C without the XOR operator, ⊕.

A: Boolean simplifications used to solve the given problem:

question_answer

Q: 1. Briefly explain the language used by computer. 2. what is the classification of the numbering sys...

A: We will answer the first question since the exact one was not specified. Please submit a new questio...

question_answer

Q: In C++ Create a function that takes in an array and outputs the min, max and average of the array to...

A: A function is to be created in C++ that will take in an array and will results with minimum, maximum...

Sorry about that. What wasn’t helpful?