Question: Write a WordCount class (and any necessary helper classes) : Write a Hash Table class (and any necessary helper classes): Separate chaining is the strategy
Write a WordCount class (and any necessary helper classes):

Write a Hash Table class (and any necessary helper classes): Separate chaining is the strategy used to handle collision, which means the structure of the Hash Table looks like the picture below (see the Hash Table ADT lectures). The hash table size must be variable (not hard coded) according to user input, so that you can test with a variety of values. Keys will be the words from the input file and the values will be a count (of their occurrences). Method for converting a key to its hash code is up to you, but a simple option is to sum the UNICODE VALUE of each character. You may wish to enhance the calculation by accounting for the position of each character in the key. Make sure to account for case (i.e., do you consider upper and lower case to be equivalent?). You must have separate methods for calculating hashCode() and hashIndex(). For example: Key "The" Hash code = (int) 'T', + (int) 'h', + (int) 'e' = 84 + 104 + 101 = 289 Hash index = Hash code compressed to table size As usual, provide constructors and mutator and accessor methods for all instance variables, plus toArray() and toString() methods. Your unit testing (use main() and utility methods in HashTable.java) must be thorough - test all methods
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
