96%(194)186 out of 194 people found this document helpful
This preview shows page 3 - 5 out of 6 pages.
Insert copied code from Final Project RubricIF password matches stored credentials in user.txtDISPLAY role system information ELSE LOOP PROMPT user to re-enter passwordEXIT program after 2nd loopIF user inputs “logout”EXIT programErrors and Solutions DocumentationThe first error occurred with authentication of the username and password. Originally, theuser was prompted to enter their username, which was matched to the text file. In order to get to the next username, the program would have to go through each other String entered. To simplify the process, the username and password were adjusted to prompt the user for both prior to
AUTHENTICATION SYSTEM 4running any code or any verification. A second loop was also needed to run through the array to match usernames and the corresponding hashed password. With the usage of JOptionPane, the “logout” option was no longer necessary as clicking “OK” on the dialog box resulted in the sameoutcome. The additional option of exiting at any time by entering “quit” into the username or password field was added for further user convenience. There were not many errors encountered during further creation of the code. The program still follows the pseudocode with minor changesand the incorporation of other methods.