Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m looking to write a program that reads a file containing a full name, userna

ID: 3657553 • Letter: I

Question

I'm looking to write a program that reads a file containing a full name, username, and password for each user. Then to create a hashmap with the username as key, and the password as value. Then to create a second hashmap with the username as key and the full name as value. Once the file is read, prompt the user to enter username and password (the user gets 3 tries to input password, terminate the program if the password is incorrect all 3 times). A sample line from a file would contain any random text ordered as follows: John Smith JSmith pword555 Some sample output: Enter Login: JSmith Enter Password: pword555 Login Successful. Welcome, John Smith            

Explanation / Answer

Here are two sample runs of the program: Sample Run 1 Login: rpokemon Password: drow456 Login successful Welcome Rayquazza Pokemon In practice, the password is hidden when it is typed, but don’t worry about that in your program. Sample Run2 Login: cdude Password: trythis Either the username or password is incorrect. You have 2 more attempts. Login: cdude Password: trythat Either the username or password is incorrect. You have 1 more attempt. Login: cdude Password: 675rtht! Sorry. Incorrect login. Please contact the system administrator.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote