Results 1 to 2 of 2
Like Tree2Likes
  • 2 Post By DarrylBurke

Thread: I think this is Java that has Division ..

  1. #1
    quidd is offline Member
    Join Date
    Jan 2012
    Rep Power

    Default 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.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default 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

    sunde887 and Fubarable like this.
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Help with java division
    By louisw in forum Advanced Java
    Replies: 6
    Last Post: 09-29-2011, 06:09 AM
  2. int division
    By überfuzz in forum New To Java
    Replies: 5
    Last Post: 03-24-2011, 07:10 PM
  3. Replies: 1
    Last Post: 03-09-2011, 03:45 PM
  4. big double division
    By grilo in forum Advanced Java
    Replies: 4
    Last Post: 10-11-2009, 10:07 PM
  5. java division and decimal error
    By heartysnowy in forum New To Java
    Replies: 5
    Last Post: 10-07-2009, 04:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts