subject

Java onlydo not use recursionyou will create a linkedlist of word objects using all the words found in the input file words. txt. a word object contains 2 string fields; 1 to store a word in its normal form and the other to store a word in its canonical 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 the normal form of the word in the normal form field and converting the normal form into the canonical form 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 comparable. using an iterator on the linkedlist of word, create a 2nd 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 list 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 “out7.txt.” be sure to format the output to be very clear and meaningful. be sure to instantiate new objects whenever transferring data from one object to another such as copying one list of objects to another using defensive copying. also, be sure to include various methods for manipulation and access of fields as well as methods to reduce code in main, such as the input/output of file data(like all other assignments, you will be graded on decomposition, i. e. main should not contain too many lines of code).keep in mind such items as proper documentation (including javadoc), meaningful variable names, proper indentation, reduction of redundancy whenever possible, and so on. part of your grade will depend on time. if written correctly (use of iterators and care taken when creating the anagram families), the running time should be less than 3 seconds. programs that take longer will lose points based on the time. as encouragement to consider all options for speed, programs taking 1 minute will receive a 40 point deduction. any longer than 3 minutes will receive only minimal points (10) for effort. as a reminder, you will create at least 5 files: the driver, word class, anagramfamily class, and 2 comparators: 1 to compare word objects for sorting descending based on the normal form of word objects and 1 to compare anagramfamily sizes for a descending sort.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:00, tchloe448
What makes myhexadecimalnumber a child of mynumber? which methods does myhexadecimalnumber inherit directly from the mynumber class? what can an instance of the mynumber class do? what can an instance of the myhexadecimalnumber class do? which methods are overridden? why are they overridden? how many examples of overloading are there? why was this done? where is the super keyword used? what is it doing? why isn’t the incoming value set immediately in the second myhexadecimalnumber constructor? how many examples can you find of an inherited method being called?
Answers: 1
image
Computers and Technology, 23.06.2019 21:00, webbjalia04
Uget brainliest if accurate mary has been given the responsibility of hiring a person for the position of a software testing officer. which management function would mary achieve this responsibility?
Answers: 1
image
Computers and Technology, 24.06.2019 12:00, yagalneedshelp8338
Match the function to its purpose. fast worth 50pts.
Answers: 1
image
Computers and Technology, 24.06.2019 15:30, taylorpayne525p8qxky
What is not a type of text format that will automatically be converted by outlook into a hyperlink?
Answers: 1
You know the right answer?
Java onlydo not use recursionyou will create a linkedlist of word objects using all the words found...

Questions in other subjects:

Konu
Mathematics, 26.08.2021 21:30
Konu
English, 26.08.2021 21:30
Konu
Mathematics, 26.08.2021 21:30
Konu
English, 26.08.2021 21:30