Java Use Chainedhashtable Pairs Use Count Frequencies Words Pride Prejudice Create Pair Cl Q43799488
In Java
-
Use a ChainedHashTable of Pairs and use it to countfrequencies of words in Pride and Prejudice
.
-
Create a Pair class with two members: T key and Svalue.
-
Create a ChainedHashTable of Pair’s. In your Mainclass’s static main method, fill the HashTable with the first Nwords in Pride and Prejudice. Each word should be paired with itsfrequency, the number of times it appears in the book. Please leavepunctuation in (so the third paragraph contains the words Bennet,”whereas the fourth paragraph contains the wordBennet).
-
Measure the time it takes to fill the HashTable where N= 10,000, 20,000, 40,000, and 80,000.
-
What is the complexity of adding N word-frequency Pairs(with duplicates) to a HashTable? Refer to the timing results tojustify your answer.
-
-
Use your main method to print the words husband, wife,Elizabeth, and Darcy and their frequencies in the entire book(where they appear without punctuation).
Expert Answer
Answer to In Java Use a ChainedHashTable of Pairs and use it to count frequencies of words in Pride and Prejudice. Create a Pair c…
OR