Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this project, you will maintain the information of a dictionary using Hashing. Your program will read the words and their meanings ( synonyms )

In this project, you will maintain the information of a dictionary using Hashing. Your program will read the words and their meanings (synonyms) from a file named words.txt. As well, the user should be able also to enter new words (and their meanings) into the program.
Please use the following format for inputs
Word:Meaning1#Meaning2#Meaning3
Example:
good:fine#excellent#great
Note that each word will consist of max of three synonyms only.
You will have to create a hash table to store the words and use words as the keys. You should implement hashing in two different methods to resolve collisions using open-addressing and double hashing and generate 2 different hash tables each using the different methods.
The following options should be available for the user. For each option, you should provide the related information for both hash tables you have created:
Print hashed tables (including empty spots).
Print out table size and the load factor.
Print out the used hash functions.
Insert a new record to hash table (insertion will be done on both hash tables).
Search for a specific word (specify which table to search in).
Delete a specific word (from both tables).
Compare between the two methods in terms of number of collisions occurred. Here you have to print the number of collisions occurred (if happened) once every new word is inserted.
Save hash table back to a file named saved_words.txt (of the double hashing)
Grading policy:
Your application should have all functionalities working properly. Twenty marks will be graded for the functionality of the project;
The following notes will make up the remaining 10 marks of the grade:
a. There has to be adequate documentation and comments in the code (i.e., functions, loops, etc.);
b. Your code should follow the code convention (i.e., spaces, indentations, etc.); and
c. Your application should contain a menu to allow the user to select which option (s) he would like to run.
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

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

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions

Question

To what extent is public speaking similar to conversation?

Answered: 1 week ago

Question

What is Ramayana, who is its creator, why was Ramayana written?

Answered: 1 week ago

Question

To solve by the graphical methods 2x +3y = 9 9x - 8y = 10

Answered: 1 week ago