Question: The fact that Java has a HashMap class means that no Java programmer has to create an implementation of hash tables from scratch -- unless,

The fact that Java has aHashMapclass means that no Java programmer has to create an implementation of hash tables from scratch -- unless, of course, you are a computer science student.

For this exercise, should create a hash table in which both the keys and the values are of typeString. (This is not an exercise in generic programming; do not try to create a generic class.) create an implementation of hash tables from scratch. Define the following methods:get(key), put(key,value), remove(key), containsKey(key),andsize().Remember that every object,obj, has a methodobj.hashCode()that can be used for computing a hash code for the object, so at least you don't have to define your own hash function. Do not use any of Java's built-in generic types; create you own linked lists using nodes as covered in section 9.2.2 of the textbook. http://math.hws.edu/javanotes/c9/s2.html

However, do not have to worry about increasing the size of the table when it becomes too full.

Make sure create a short program to test the solution

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 Programming Questions!