Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CIS 256 (JAVA - DATA STRUCTURE) Programming Project 1 (Hash Tables) For this programming project, you will be implementing a spelling checker. The spelling checker

CIS 256 (JAVA - DATA STRUCTURE)

Programming Project 1 (Hash Tables)

For this programming project, you will be implementing a spelling checker. The spelling checker will accept words from a dictionary and a document and then output the words in the document that are not in the dictionary. You should store the words in the dictionary in a hash table and your program should output statistics about the hash tables performance. The instructions are as follows: 1. Implement the separate chaining HashTable template class. You should use your HashTable class to store the words (i.e. strings) in the dictionary. Use one the hash function explained in your textbook. 2. Add a new method to the HashTable class called printStats() that prints the minimum, maximum, and mean chain length for all the chains in the hash table. 3. Use included dictionary and document files 4. You may assume that the dictionary file always have the filename dictionary.txt and the document file always have the filename document.txt. 5. Save the dictionary and document files in the same directory as your executable code. 6. The dictionary file contains one word per line, and the first line will be the number of words in the file. The words are all in lowercase. 7. The document file contains lowercase words separated by spaces or new lines. 8. Your program should work with any dictionary and document files that comply with the above constraints. 9. Provide a main program. Your main program should do the following: (a) Create a hash table whose size is equal to the number of words in the dictionary. (b) Read the words from the dictionary and store each one in the hash table. (c) Output the statistics (i.e. minimum, maximum, and mean chain length) of the hash table after all words in the dictionary has been stored in the hash table. (d) Read the words from the document and output each word that is NOT in the dictionary. The following are the additional instructions for this programming project: This programming project is to be done individually. Create a readme.txt le that describes exactly how to compile and execute your program. Collect your source codes, readme le, and other les needed to compile and execute your program into one ZIP le called YourFirstName_YourLastName_prog3.zip. Please DO NOT include any executable les in your ZIP le. Make sure you follow good object-oriented programming approach, good coding style, and proper documentation. The grading for this programming project will be based not only on the correctness of the program, but also on the programs overall design, coding style, and documentation.

-----------------------------------------------------------------------------------------------------

document.txt

emma woodhouse handsome clever and rich with a comfortable home

and happy disposition seemed to unite some of the best blessings

of existence and had lived nearly twenty one years in the world

with very little to distress or vex her

she was the youngest of the two daughters of a most affectionate

indulgent father and had in consequence of her sister's marriage

been mistress of his house from a very early period her mother

had died too long ago for her to have more than an indistinct

remembrance of her caresses and her place had been supplied

by an excellent woman as governess who had fallen little short

of a mother in affection

the wedding was very much like other weddings where the parties

have no taste for finery or parade and mrs elton from the

particulars detailed by her husband thought it all extremely shabby

and very inferior to her own very little white satin very few

lace veils a most pitiful business selina would stare when she

heard of it but in spite of these deficiencies the wishes

the hopes the confidence the predictions of the small band

of true friends who witnessed the ceremony were fully answered

in the perfect happiness of the union

-------------------------------------------------------------------------------------------------------------------

There is dictionary file as well but its too large to attach!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions