Question: In this Java program, you are supposed to create a log-in system for a company. You must use a multi-dimensional array to complete this assignment.
In this Java program, you are supposed to create a log-in system for a company. You must use a multi-dimensional array to complete this assignment.
Create a multi-dimensional matrix with three rows and ten columns. This multi-dimensional array will act like a database for this login system.
Ten columns will store the login information of ten different users. The first row should contain the usernames of ten users, the second row should contain the password of corresponding users from row one. The third row should contain the last four digits of social security number of the user. Be creative with the usernames and passwords.
Sample database is in the picture:
On startup, your program will prompt the user to enter the username, then the password. The program will then check its database to find the username, if the username doesnt exist, then the program will produce an error message and exit. If the username exists, then the program will check if the password entered matches the password in the database or not.
If the password matches with the password in the system, then you can generate a message saying that the login was successful.
If the password doesnt match the password in the system, then you ask the user to re-enter the password. If the new password matches the password in the system, you can generate a message saying that the login was successful. If the user fails to provide the correct password at the second attempt, then you should ask the user for the last four digits of their social security number. If the user can provide the correct last four digits of social security number, then you should display their password. If the user types wrong last four digits of social security number then, the program should generate an error message asking the user to contact the administrator and system should exit.
You MUST write three different methods other than the main method to check the username, to check the password, and to check the SSN
To exit the system, you can use System.exit(1) method.


JGRASP exec: java Assignment3 Welcome my log-in software Please enter your username: abc Please enter the password: pqr Error, username not found! jGRASP: operation complete. -jGRASP exec: java Assignment3 Welcome my 1og-in software Please enter your username: LBJ23 Please enter the password: cleveland Login successful! -jGRASP: operation complete jGRASP exec: java Assignment3 Welcome my log-in software >| Please enter your username: minion Please enter the password: abc Sorry wrong password! Please enter the password: iscute Login successful! GRASP: operation complete jGRASP exec: java Assignment3 Welcome my log-in software Please enter your username ironman Please enter the password: abc Sorry wrong password! Please enter the password: pqr Please verify your identity, enter the last 4 digits of your SSN 3234 Your password is: isthehero GRASP: operation complete
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
