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, 22.06.2019 02:30
Larry sent an email to andy. andy didn't open larry's email but still understood what the message was. how did andy determine the message without opening the email?
Answers: 1
question
Computers and Technology, 22.06.2019 23:00
Suppose s, t, and w are strings that have already been created inside main. write a statement or statements, to be added to main, that will determine if the lengths of the three strings are in order by length, smallest to largest. that is, your code should determine if s is strictly shorter than t, and if t is strictly shorter than w. if these conditions hold your code should print (the boolean value) true. if not, your code should print false. (strictly means: no ties) example: if s, t, and w are "cat", "hats", and "skies" your code should print true - their lengths are 3-4-5; but if s, t, and w are "cats" "shirt", and "trust", then print false - their lengths are 4-5-5 enter your code in the box below
Answers: 2
question
Computers and Technology, 23.06.2019 16:30
How to do this programming flowchart?
Answers: 3
question
Computers and Technology, 23.06.2019 19:00
Write a program that displays the following menu: geometry calculator 1. calculate the area of a circle 2. calculate the area of a rectangle 3. calculate the area of a triangle 4. quit enter your choice (1-4): if the user enters 1, the program should ask for the radius of the circle and then display its area. use the following formula: area = ď€(the square of r) use 3.14159 for ď€ and the radius of the circle for r. if the user enters 2, the program should ask for the length and width of the rectangle and then display the rectangle’s area. use the following formula: area = length * width if the user enters 3, the program should ask for the length of the triangle’s base and its height, and then display its area. use the following formula: area = base * height * .5 if the user enters 4, the program should end. input validation: display an error message if the user enters a number outside the range of 1 through 4 when selecting an item from the menu. do not accept negative values for the circle’s radius, the rectangle’s length or width, or the triangle’s base or height. note: if the user enters an improper menu choice (1-4), the program prints "the valid choices are 1 through 4. run the program again and select one of those." if the user enters a negative radius, the program prints "the radius can not be less than zero." if the user enters a negative value for height or base, the program prints "only enter positive values for base and height."
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.01.2021 20:50
question
Mathematics, 22.01.2021 20:50
question
Biology, 22.01.2021 20:50
question
History, 22.01.2021 20:50
question
English, 22.01.2021 20:50
Questions on the website: 13722367