Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In java: I need help writing a HashtableExperiment.java class, which makes use of HashTable.java ( an abstract class ) , HashObject.java, LinearProbing.java ( h 1
In java:
I need help writing a HashtableExperiment.java class, which makes use of HashTable.java an abstract class HashObject.java, LinearProbing.java hk k mod m DoubleHashing.java Primary : hk k mod m; secondary hash function is hkk mod m mod m TwinPrimeGenerator.java to find the size of the Hashtables using a twin prime between and
HashtableExperiment.java has the following usage:
Usage: java HashtableExperiment
: random numbers
date value as a long
word list
: The ratio of objects to table size,
denoted by alpha nm
: print summary of experiment
save the two hash tables to a file at the end
print debugging output for each insert
Word List is a long txt file with a word on each line.
When saving the hash tables to a file, the format should be as follows where the two numbers after the key are the number of duplicate keys and the probe count for the first key inserted.
table: equivocates
table: gryphon
table: frank'd
Printout of summary should look like this:
HashtableExperiment: Found a twin prime table capacity:
HashtableExperiment: Input: WordList Loadfactor:
Using Linear Probing
HashtableExperiment: size of hash table is
Inserted elements, of which were duplicates
Avg. no of probes
Using Double Hashing
HashtableExperiment: size of hash table is
Inserted elements, of which were duplicates
Avg. no of probes
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started