Question: Your task for this lab is to write and test a subclass of User called SecureUser. This subclass should override the authenticate method to meet

Your task for this lab is to write and test a subclass of User called SecureUser. This subclass should override
the authenticate method to meet more stringent requirements. In particular, a SecureUser class should
"lock" a user out after three consecutive failed authentications. In other words, the authentication method
should return true only if the string passed into the method matches the password AND there have not been
three consecutive failed authentications. If the user has two failed authentications and then a successful
authentication, you should reset the number of consecutive failed authentications to zero. You should also
add code to Main.java so that it thoroughly tests the SecureUser class. It is up to you how many tests you
want to create.
You should not make any changes to User.java, and you should only add to Main.java. Do not change any
code that is already present.
Hint: You will probably find it useful to add a new field to the SecureUser class to keep track of the number
of consecutive failed authentications.
 Your task for this lab is to write and test a

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!