(Word Histogram): Design and implement an application that creates a histogram t
ID: 3531179 • Letter: #
Question
(Word Histogram): Design and implement an application that creates a histogram that allows you to visually inspect the frequency distribution of a set of word in a given file. The program should read the input file name and output file name as command line arguments. A word is defined as collection of letters a-z and A-Z
For example if the input file is:
How much wood would a woodchuck chuck
If a woodchuck could chuck wood?
He would chuck, he would, as much as he could,
And chuck as much wood as a woodchuck would
If a woodchuck could chuck wood.
The output file will contain:
a : 4
and : 1
as : 4
chuck : 5
could : 3
he : 3
how : 1
if : 2
much : 3
wood : 4
woodchuck : 4
would : 4
Hint:
While(inputFile.hasNext())
{
Read a line
add
Explanation / Answer
Please rate with 5 stars :)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.