subject

Part 2: 1. Create a new Java project called Lab8B and a class named Lab8B 2. Inside this project create a class called PasswordChecker, which should have the following. a. A String instance variable named password. b. A constructor that accepts one string as a parameter and puts it into the instance variable. c. A bool method named checkPassword that returns a true if it is valid, and false otherwise. The rules for a password are: i. It must be at least 8 characters long ii. It must have at least one number in it. iii. It must have at least one of the following characters: ! & * % $ iv. It cannot have two identical characters beside each other. (Ex – Their8WWorld is invalid because of the 2 WW beside each other.) 3. Back in the main method of the outer class: a. Ask the user to enter a password b. Declare and instantiate a PasswordChecker object (with a name of your choice) and send in the input password as the parameter. c. Call checkPassword for the object and print the result with a label.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
3. (6 pts) internally in the computer, with few exceptions, all numerical computation is done using binary numbers. output, however, often uses ascii, which is formed by appending 011 to the left of a bcd code. thus, an algorithm that directly converts a binary integer to a bcd integer is very useful. here is one such algorithm 1) draw lines to the left of the binary number to bound the expected bcd decades. (each decade is a group of 4 bits.) move the binary number one bit to the left. add 0011 to each bcd decade containing a binary value> 0100 repeat steps 2-3 until the last bit in the binary number has been moved into the least significant decade position. (note that when the last bit has been shifted into bcd decade, step 3 is not repeated.) read the bcd result. 2) 3) 4) 5) a) execute the algorithm for the binary number 1101101 b) execute the algorithm for the binary number 01110101110 4. (4 pts) represent the decimal number 3568 in bcd; excess-3 code; ascil; and hex.
Answers: 1
question
Computers and Technology, 22.06.2019 19:10
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
Which statistical function in a spreadsheet you to see how far each number varies, on average, from the average value of the list?
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
Write an essay on online collaboration, how to do it, the challenges, resolving the challenges, and consider whether the risks are greater than rewards. ( need )
Answers: 1
You know the right answer?
Part 2: 1. Create a new Java project called Lab8B and a class named Lab8B 2. Inside this project cre...
Questions
question
Mathematics, 22.08.2019 10:30
question
Mathematics, 22.08.2019 10:30
question
Mathematics, 22.08.2019 10:30
question
Biology, 22.08.2019 10:30
Questions on the website: 13722361