Question: Homework Hash Table: Part 1: Prompt a user in a console output OR Create an optional small GUI program using javax.swing components that will prompt
Homework Hash Table:
Part 1: Prompt a user in a console output OR Create an optional small GUI program using javax.swing components that will prompt the user to search a word.
Eg.
Word to search for: Data Structure
Data Structure(noun) - (computer Science)The organization of data and its storage allocations in a computer.
Part 2: A text file named "dictionary.txt" will be provided to you for the database of English words, their
type (noun, verb, etc.) and their meaning. Create an efficient hash function to
convert each word into an int Key:
sample lines in dictionary.txt:
power_tool|NOUN|a tool driven by a motor
power_train|NOUN|wheelwork consisting of a connected set of rotating gears by which force is transmitted or motion or torque is changed; "the fool got his tie caught in the geartrain"
power_trip|NOUN|(slang) a self-aggrandizing action undertaken simply for the pleasure of exercising control over other people
power_unit|NOUN|a measure of electric power
Note: the text file will containe single words or multiple words connected via underscore, the type of
the word (noun, verb, etc) and its meaning. So if we search for Data Structure, we will find
Data_Structure which will be valid result to return.
Part 3: Implement Linear Probing, Quadtratic Probing, Separate Chaining, Double Hashing techniques
discussed in class. Chose an appropriate Lamda value per implementation. Use Key generation in part 2
to store the node (key, type, meaning) in the hash table.
Part 4: Once a word is searched, output its meaning and provide the information related to each specific
implementation in the ouput. For example:
Final output:
Word to search for: Data Structure (Enter)
Data Structure(noun) - (computer Science)The organization of data and its storage allocations in a computer.
Total Words: xxxxx
Data Structure Table Size Lambda Success Items Investigated
Linear Probing xxx xxx yes/no xxx
Quadratic Probing xxx xxx yes/no xxx
Separate Chaining xxx xxx yes/no xxx
Double Hashing xxx xxx yes/no xxx
Use JAVA or C/C++
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
