Search:

Type: Posts; User: Norm

Search: Search took 0.14 seconds.

  1. Replies
    8
    Views
    1,519

    Re: Reading Text Files Assignment [Scanner Method]

    The posted code does that now. ????


    What is the sample size? Can you count how many times the loop goes around?
    Define a counter variable and add one to it each time the loop goes around.
    ...
  2. Replies
    8
    Views
    1,519

    Re: Reading Text Files Assignment [Scanner Method]

    Not sure what "assign a variable to each line" means? The code in Post#1 uses the content of each line to add 1 to a separate counter determined by the contents of each line. That code looks...
  3. Replies
    8
    Views
    1,519

    Re: Reading Text Files Assignment [Scanner Method]

    Now break step 3 down further. Its not detailed enough. One thing to consider when reading from a file is when there isn't any data left. Keep reading until no more data.

    In step 4 Where do you...
  4. Replies
    8
    Views
    1,519

    Re: Reading Text Files Assignment [Scanner Method]

    Start by cleaning up the errors. Post the full text of the error messages.

    Or another approach: throw out what you have coded and start fresh.
    Make a list of the steps the program needs to do...
Results 1 to 4 of 4