Question: Write a java program that reads a file (input.txt) and produces a histogram of the most frequently used words (all in lower case) found in

Write a java program that reads a file (input.txt) and produces a histogram of the most frequently used words (all in lower case) found in the text. Ignore capitalization, whitespace, and punctuation. Sort the output in order of increasing usage of words. Words with same frequency can appear in any order.

Write a java program that reads a file (input.txt) and produces a

You need to develop 3classes: 1-Class Node with two instance variables to record a word and the frequency of that. Class Node implements Comparable Node Node String word Int freq 2- Class Algorithm with two methods 2-1)Method sort: which gets a Vector of Nodes as its parameter and it returns the sorted 2-2) Method printVector: which gets a Vector of Nodes as its parameter and it prints the vector based on the above format (Sample Output) Algorithm static.... Sort( Static print Vector( 3- Class Test, Which reads the input file and creates a vector of Nodes (for the words in the file), and sorts and prints the result using methods in class Algorithm

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!