Question: Please Help. Also, Please only do exactly what is required and no additional commands or code. Thank you!! The goal of this project is to

Please Help. Also, Please only do exactly what is required and no additional commands or code. Thank you!!

The goal of this project is to explore the insertion performance of a hash table, using linear probing. You will produce a data set that shows the average displacement for the entire data set of size N when it is placed in a hash table of size M for various value of the ratio N/M.

1. First, implement the hash table class described in the text book.

2. Next, write a test method (you can use the main() method of your HashTable class) that adds values to the hash table. You can generate random integers, or read words from a file, or anything convenient for you (I generated random numbers using StdRandom.uniform(1000000)). Each time a value is added, you will need to measure and record the displacement (how far each entry had to be shifted from its natural position, due to collision).

3. Generate a data set consisting of the average displacement across the whole data set (all N keys). Actually, you will need to do this a number of times.

4. Run step 3 for a variety of values of N for a given M.

5. Produce a graph: the X values are the different ratios of N/M, and the Y values are the average displacement across a number of data sets. The completeness and accuracy of your graph will be a significant part of your grade (3 or 4 data points won't cut it).

6. Finally, discuss your findings.

Your report will consist of:

1. Your Java source code for the final program;

2. a brief statement of your approach to the problem;

3. the table and graph of results; and

4. a paragraph in which you describe the results.

computer code:

if this doesnt help please write own hash

Please Help. Also, Please only do exactly what is required and no

public class Transaction private final String who; private final Date when; private final double amount public int hashCode O int hash = 17; hash 31 hash +who.hashCode O; hash 31 hash when.hashCode) hash- 31 hash ((Double) amount).hashCode(); return hash; public class Transaction private final String who; private final Date when; private final double amount public int hashCode O int hash = 17; hash 31 hash +who.hashCode O; hash 31 hash when.hashCode) hash- 31 hash ((Double) amount).hashCode(); return hash

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!