subject

Having a secure password is a very important practice, when much of our information is stored online. Write a program that validates a new password, following these rules: The password must be at least 8 characters long. The password must have at least one uppercase and one lowercase letter The password must have at least one digit. Write a program that asks for a password, then asks again to confirm it. Next, write a method: public static void check(String pw1, String pw2) If the passwords don’t match or the rules above are not fulfilled, print a message that the password is not valid. Here are some tips for checking the password: Use .equals() to compare two strings Use a loop to check each character of the password. In the loop, use Character. isDigit() to check if a character is a digit or not. Use Character. isUpperCase(nextChar) and Character. isLowerCase(nextChar) to check if a character is upper or lower case (where nextChar is the next current character in your password string). You could use flag variables to set if a digit, upper, and lowercase letter are found.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:30
At an open or uncontrolled intersection, yield if a. the cross road has more lanes than yours b. the cross road has fewer land than yours c. you’re on a state highway and the cross road is a secondary road d. do you have three or more passengers in your vehicle
Answers: 2
question
Computers and Technology, 22.06.2019 11:00
The great length of north america causes the climate to be varied. true false
Answers: 2
question
Computers and Technology, 22.06.2019 17:40
Write a modular program (no classes yet, just from what you learned last year), that allows two players to play a game of tic-tac-toe. use a two-dimensional char array with 3 rows and 3 columns as the game board. each element of the array should be initialized with an asterisk (*). the program should display the initial board configuration and then start a loop that does the following: allow player 1 to select a location on the board for an x by entering a row and column number. then redisplay the board with an x replacing the * in the chosen location. if there is no winner yet and the board is not yet full, allow player 2 to select a location on the board for an o by entering a row and column number. then redisplay the board with an o replacing the * in the chosen location. the loop should continue until a player has won or a tie has occurred, then display a message indicating who won, or reporting that a tie occurred. player 1 wins when there are three xs in a row, a column, or a diagonal on the game board. player 2 wins when there are three ox in a row, a column, or a diagonal on the game board. a tie occurs when all of the locations on the board are full, but there is no winner. input validation: only allow legal moves to be entered. the row must be 1, 2, or 3. the column must be 1, 2 3. the (row, column) position entered must currently be empty (i.e., still have an asterisk in it).
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
After you clean an engine with hot water spray, it seems to stall; when it doesn't stall, it's idling noisily. technician a says to check for loose bolts on the flex plate near the torque converter. technician b says to wipe down the spark plug wires and the distributor cap. who is correct? a. technician a b. both technicians a and b c. technician b
Answers: 1
You know the right answer?
Having a secure password is a very important practice, when much of our information is stored online...
Questions
question
Mathematics, 01.10.2021 15:50
question
Geography, 01.10.2021 15:50