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

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 17:10
3. consider the following class definitions: class smart class supersmart: public smart { { public: public: void print() const; void print() const; void set(int, int); void set(int, int, int); int sum(); int manipulate(); smart(); supersmart(); smart(int, int); supersmart(int, int, int); private: private: int x; int z; int y; int secret(); }; }; . which private members, if any, of smart are public members of supersmart? a. which members, functions, and/or data of the class smart are directly accessible in class supersmart?
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
What are the 12 colors of the spectrum called?
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
2. fluorine and chlorine molecules are blamed fora trapping the sun's energyob forming acid rainoc producing smogod destroying ozone molecules
Answers: 2
question
Computers and Technology, 24.06.2019 13:20
3. ranga ramasesh is the operations manager for a firm that is trying to decide which one of four countries it should research for possible outsourcing providers. the first step is to select a country based on cultural risk factors, which are critical to eventual business success with the provider. ranga has reviewed outsourcing provider directories and found that the four countries in the table that follows have an ample number of providers from which they can choose. to aid in the country selection step, he has enlisted the aid of a cultural expert, john wang, who has provided ratings of the various criteria in the table. the resulting ratings are on a 1 to 10 scale, where 1 is a low risk and 10 is a high risk. john has also determined six criteria weightins: trust, with a weight of 0.3; quality, with 0.2; religious, with 0.1; individualism, with 0.2; time, with 0.1; and uncertainity, with 0.1. using the factor-rating method, which country should ranga select? why? (2 points)
Answers: 3
You know the right answer?
Java onlydo not use recursionyou will create a linkedlist of word objects using all the words found...
Questions
question
Mathematics, 19.10.2020 14:01