Question: Hash Assignment In this assignment, you will consider the problem of organizing a collection of computer user-ids and passwords. Each time a user logs in

Hash Assignment

In this assignment, you will consider the problem of organizing a collection of computer user-ids and passwords. Each time a user logs in to the system by entering his or her user-id and a secret password, the system must check the validity of this user-id and password to verify that this is a legitimate user.

Because this validation must be done many times each day, it is necessary to structure this information in such a way that it can be searched rapidly. Moreover, this must be a dynamic structure because new users are regularly added to the system and some users deleted from the system.

Upon execution of your program, it should first read the user-ids and passwords from a file and create a hash using the user-id as a key (assume unique user-ids for convenience). Note: Initially it will be empty.

Once the hash has been built, it should display the following menu:

(1) Add new user

(2) Delete user

(3) Verify user

(4) Print users

(5) Quit

Option (1) and (2) simply add/delete new/existing users.

When option (3) is selected, the user is supposed to enter a user-id and a password.

Then, you should search the tree and a print message like "Valid User" or "Invalid User".

When option (4) is selected, the users and their passwords should be printed out in alphabetical order.

Finally, when option (5) is selected, the elements of hash should be stored to a file and execution should be terminated.

Test all options.

Print out File.

Write your conclusions.

Include code.

Screen prints of successful execution.

PreviousNext

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!