Results 1 to 2 of 2
- 01-19-2012, 10:18 AM #1Member
- Join Date
- Jan 2012
- Rep Power
I think this is Java that has Division ..
Hello Guys . ! i need some help about this :D
PROG 131 – Computer Programming II
Hands – on Exam Problem
Write a class named WordCount. This class contains a method wordCount that has a single String parameter, s. Assuming that s consists of words separated by whitespace, the method should return the number of words in s and the percentage of its use on the file. Words to be counted should be based on the words contained on the text file given. In comparing the words do not consider the case of the letters.
Sample words on the text file:
Testing can show the presence of errors, but not their absence.
Sample output of your program:
Word Count Report
Total number of words: 11
testing 1 0.09%
can 1 0.09%
show 1 0.09%
the 1 0.09%
presence 1 0.09%
of 1 0.09%
errors 1 0.09%
but 1 0.09%
not 1 0.09%
their 1 0.09%
absence 1 0.09%
• Display a word count report for each line in the given text file.
• The name of the input text file is wordCount_input.txt.
• Aside from displaying the word count report on the screen, write the output in a text file named wordCount_output.txt.
and this is my wordCount_input.txt ..
It is easier to write an incorrect program than understand a correct one. Every program has at least two purposes: the one for which it was written and another for which it wasn't.
- 01-20-2012, 07:31 AM #2
Re: I think this is Java that has Division ..
This isn't a homework service. Do you have a specific question?
Recommended reading: How to ask questions the smart way
dbIf you're forever cleaning cobwebs, it's time to get rid of the spiders.
- By louisw in forum Advanced JavaReplies: 6Last Post: 09-29-2011, 06:09 AM
- By überfuzz in forum New To JavaReplies: 5Last Post: 03-24-2011, 08:10 PM
- By amityadav9314 in forum New To JavaReplies: 1Last Post: 03-09-2011, 04:45 PM
- By grilo in forum Advanced JavaReplies: 4Last Post: 10-11-2009, 10:07 PM
- By heartysnowy in forum New To JavaReplies: 5Last Post: 10-07-2009, 04:57 PM