Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HashMap Lab John is creating a website login page. He needs your help implement an application that will validate usemame and password. You need to

HashMap Lab
John is creating a website login page. He needs your help implement an application that will validate usemame and password. You need to write a program that will read a data.txt file that contains the full name, username, and password.
Create a HashMap that holds username as key and the password as value.
Create another HashMap that holds the username as key and full name as value.
After the file is read, prompt the user to enter the username and password. If the password is incorrect, give the user two more chances. If the password is incorrect all three times, the program quits.
If the login is successful, print a welcome message. Use the first HashMap to check the username and password match and use the second HashMap to print the welcome message.
Here is data.trt file
\table[[Reynaldo Hubbard rhunnard,gwerty 123,],[Jeffrey Roy,jroy,pa6878s5456!],[Marcus Rocha,mrocha,p 579as5word123
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

Is λ = -3 an eigenvalue of Why or why not? 9

Answered: 1 week ago

Question

4. Are there any disadvantages?

Answered: 1 week ago

Question

3. What are the main benefits of using more information technology?

Answered: 1 week ago

Question

start to review and develop your employability skills

Answered: 1 week ago