HW11: LinkedDictionary due Mon 08 Apr 10:00

\begin{purpose}
This assignment provides practice in:
\begin{itemize}
\item ...
...am that takes a substantial amount of time to run.
\end{itemize}
\end{purpose}

Allowed and Disallowed Resources

In completing this assignment you MAY use/access the following resources:

You may NOT use/access:

Failure to abide by these guidelines will result in a zero for the assignment and the incident will be reported to the university provost as a violation of the university academic integrity policy. A second incident of academic dishonesty (whether from this course or another computer science course) will result in an F in the course.

Description

An anagram is a word that results from rearranging letters from another word. For example, “listen” and “silent” are anagrams. One convenient way to determine whether two words are anagrams is to sort the letters of each word. If the sorted arrangements match one another then they are anagrams. In this assignment you will produce a list of all words that have 6 or more anagrams.

This assignment is a continuation of the work on lab day. You will create a new class (LinkedDictionary that inherits from WordList as follows:

WordList
– WordNode head head of linked list
+ WordList() creates empty list
+ void display() show contents of list
+ void insert(Word w) insert w to front of list
+ Word search(Word w) search for w in list; returns reference
+ Word remove(Word w) remove first occurrence of w if exists

$\displaystyle \Bigg\uparrow $

LinkedDictionary
   
+ LinkedDictionary(String f) read words from file and insert into list
+ int countAnagrams(Word w) look through list and return count of w's anagrams
+ void displayBigAnagramFamilies() display each word with 6+ anagrams

For testing purposes you might use a hand-crafted data file with 20 or so words in it (some of which are anagrams). Once you have the program working you can use the provided data file found in the repository: data/mywords.txt (which has over 350,000 words).

You will also need to add a method to Word that will accept another Word object as a parameter and will return true if they are anagrams (false if not). We will use this function rather than .equals() because the latter has already been written to compare the words themselves rather than the sorted versions of the words.

Your solution should use the design specified above. The driver should create a LinkedDictionary and then display its big (6 or more) anagrams. You should add code in main to time actions of the program and display the result at the end. NOTE: When you run the program using the large dictionary file it will take quite a bit of time to finish.

Grading

The assignment will be graded according to the following criteria:
Correctness 16 pts
Documentation 2 pts
Conventions 2 pts
Version Control 2 pts
Total 22 pts

Your program should be completely working and should follow all of the programming conventions named in class and explained in http://josephus.hsutx.edu/classes/all/javaconventions/ (including the use of comments that conform to the JavaDoc guidelines).

The instructor will grade your work based on what you have pushed to the hosted homework repository you have shared. For all assignments the program is due before the beginning of class on the due date. Repositories that show a commit time after that time will be graded as late.