Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task4 This task is for registration department of the event, they need to do the following: Register peoples names and ages who are interested to

Task4 This task is for registration department of the event, they need to do the following:

Register peoples names and ages who are interested to attend the event.

Check whether a name is registered or not.

Remove a registered person.

Print all the registered people in the event.

Your role in this task is to choose and implement a data structure to save the names of people that want to register for the event and the implementing the above required operations. The data structure that you want to choose should enable a very fast searching for a name of a person if it is registered or not. (After taking the advice of your direct manager, he guided you to use a Hash Map with Closed Addressing (chaining) to avoid collisions).

a. Implement this data structure using java, the user should access this data structure using four methods only, the functions prototype for these operations are:

boolean search(string name);

void insert(string name, int age);

void remove(string name);

void print(void);

search returns true if the name exists and false otherwise. insert takes a string as an argument and adds it to the data structure, remove deletes a name from this data structure, and print will print all the names and their related ages in this data structure. (Code in java )

b. You should handle any expected errors that may occur during the runtime of the application. (Code)

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions

Question

Understand how customers respond to effective service recovery.

Answered: 1 week ago

Question

Know the principles of effective service recovery systems.

Answered: 1 week ago