Question: Write a JAVA program to do the following The name of your class should be Authenticator. Please remove the public attribute from the class header.

Write a JAVA program to do the following

The name of your class should be Authenticator. Please remove the public attribute from the class header.

Your class is tested by a AuthenticatorApp class that reads in Users from a file using your read method, loads them into an array and prompts the keyboard for a login sequence (username/password).

For example, if the file users.data contains:

weiss puppy2 woof-woof arnow java cuppa sokol brooklyn college 

here are some sample excutions of the program:

username? arnow password? java Welcome to the system

Sample Test Run #2

Given the same users.data file as above, execution of the program should look like:

username? weiss password? dontremember *** Invalid password - hint: woof-woof username? weiss password? puppy2 Welcome to the system

Sample Test Run #3

Given the same users.data file as above, execution of the program should look like:

username? sokol password? CUNY *** Invalid password - hint: college username? sokol password? SUNY *** Invalid password - hint: college username? sokol password? BC *** Invalid password - hint: college Too many failed attempts... please try again later

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!