A good answer might be:

Sure.


The File Addition Program

The program can be written to do the problem using keyboard input. Once it has been tested and debugged, it can be used with the input file. Here is a start on the program:

import java.io.*;
class AddUpFile
{
  public static void main ( String[] args ) throws IOException
  {
    int value;
    int sum = _________________; // initialize sum

    String line;
    BufferedReader stdin = new BufferedReader( 
        new InputStreamReader( System.in ) );

    int count = _________________; // initialize count
    while ( count ____ 100 )
    {
      System.out.println("Enter a number:");
      line   = stdin.readLine();
      value  = Integer.parseInt( line.trim() );
      sum    = _________________; // add to the sum
      count  = _________________; // increment count
    }

    System.out.println( "Grand Total: " + sum );
  }
}


QUESTION 12:

Mentally fill in the blue blanks (or better yet, copy the program to Notepad and make the corrections there.)