CSC220 Lab Number 9
Due: 11:59PM, Tuesday, November 17
The goal of this assignment is to write a program that has a similar
funciton as the program for Lab Number 8, but uses a chained hash table
instead of a binary search tree for maintaining word and their occurrence
positions.
Download the following files:
The first file is an interface that defines the hash mapping,
the second is a generic class that implements a chained hash table,
and the last is a sample input file, which has the Constitution.
The tasks are as follows:
-
Implement two methods, remove and rehash, of HashTableChainjava.
-
Write a class that reads from a file
and stores for each word appearing in the document,
the line numbers in which the word appears in increasing order
and then takes from the user as input a word
and outputs the list of line numbers in which the word appear
in the input file.