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
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