Computers and Technology

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.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 07:40, daebreonnakelly
What type of multimedia are live news feeds? live news feeds are examples of multimedia.
Answers: 2
image
Computers and Technology, 24.06.2019 12:30, stephanieanaya7
Why does the pc send out a broadcast arp prior
Answers: 1
image
Computers and Technology, 24.06.2019 14:40, drecooks713
Create a function (prob3_6) that will do the following: input a positive scalar integer x. if x is odd, multiply it by 3 and add 1. if the given x is even, divide it by 2. repeat this rule on the new value until you get 1, if ever. your program will output how many operations it had to perform to get to 1 and the largest number along the way. for example, start with the number 3: because 3 is odd, we multiply by 3 and add 1 giving us 10. 10 is even so we divide it by 2, giving us 5. 5 is odd so we multiply by 3 and add one, giving us 16. we divide 16 (even) by two giving 8. we divide 8 (even) by two giving 4. we divide 4 (even) by two giving 2. we divide 2 (even) by 2 to give us 1. once we have one, we stop. this example took seven operations to get to one. the largest number we had along the way was 16. every value of n that anyone has ever checked eventually leads to 1, but it is an open mathematical problem (known as the collatz conjectureopens in new tab) whether every value of n eventually leads to 1. your program should include a while loop and an if-statement.
Answers: 3
image
Computers and Technology, 24.06.2019 22:30, toricepeda82
What are the 4 basic items that are traded throughout the world?
Answers: 1
Do you know the correct answer?
Java onlydo not use recursionyou will create a linkedlist of word objects using all the words found...

Questions in other subjects: