Question: **********Using Java*************** Create 5 CLASSES: Driver(main), Word, AnagramFamily, and 2 Comparators classes words.txt is a very large file containing thousands of words. I will post

**********Using Java***************

Create 5 CLASSES: Driver(main), Word, AnagramFamily, and 2 Comparators classes

words.txt is a very large file containing thousands of words. I will post some words down below.

**********Using Java*************** Create 5 CLASSES: Driver(main), Word, AnagramFamily, and 2 Comparators classeswords.txt is a very large file containing thousands of words. I will

some of word.txt

aa aah aahed aahing aahs aal aalii aaliis aals aardvark aardvarks aardwolf aardwolves aargh aarrgh aarrghh aas aasvogel aasvogels ab aba abaca abacas abaci aback abacterial abacus abacuses abaft abaka abakas abalone abalones abamp abampere abamperes abamps abandon abandoned abandoner abandoners abandoning abandonment abandonments abandons abapical abas abase abased abasedly abasement abasements abaser abasers abases abash abashed abashes abashing abashment abashments abasia abasias abasing abatable abate abated abatement abatements abater abaters abates abating abatis abatises abator abators abattis abattises abattoir abattoirs abaxial abaxile abba abbacies abbacy abbas abbatial abbe abbes abbess abbesses abbey abbeys abbot abbotcies abbotcy abbots abbreviate abbreviated abbreviates

DETAILS To better prepare you for assignments in more advanced courses, specific step-by-step, method headings class names, and the like have been omitted. What remains is a general description (you may need to read this several times to fully understand the requirements): form. The canonical form stores a word with its letters in alphabetical order, e.g. bob would be bbo, cat would be act, program would be agmoprr, and so on. The class Word constructor has the responsibility of storing which is stored in the canonical form field (you should call a separate method for this conversion purpose) Once all the words from the input file have been properly stored in a LinkedList of Word, you should use Collections to sort this list ascending alphabetically based on the canonical words by making the Word class Using an Iterator on the LinkedList of Word, create a 2ng list (new LinkedList) consisting of objects of a new class named AnagramFamily. AnagramFamily should contain at least 2 fields; 1 to hold a list of "Word" words that are all anagrams of each other (these should all be grouped together in the original canonical sorted list) and the 2nd field to store an integer value of how many items are in the current list. (Keep in mind, because the original list contains both the normal and canonical forms, as the AnagramFamily List will also have, a family of anagrams will all have the same canonical form with different normal forms stored in the normalForm field of the Word class). Each AnagramFamily List of Word should be sorted Descending by normal form using a Comparator of Word (if you insert Word(s) into a family one at a time, this presents an issue on how to get this ist sorted as each Word insertion will require a new sort to be performed to guarantee the list is always sorted. For this reason it is best to form a list, sort it, and then create an AnagramFamily by passing the sorted list to it). Sort the AnagramFamily LinkedList in descending order based on family size by use of a Comparator to be passed to the Collections sort method. Next, output the top five largest families then, all families of length 8, and lastly, the very last family stored in the list to a file named "out6.txt." Be sure to format the output to be very clear and meaningful

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!