introExam
Class ExamIO

java.lang.Object
  extended byintroExam.ExamIO

public class ExamIO
extends java.lang.Object

A minimal file reading class for use within the 15-111/200 Final Exam/Fall 2004


Nested Class Summary
static class ExamIO.IOIterator
           
 
Constructor Summary
ExamIO()
           
 
Method Summary
static java.util.Iterator readFile(java.lang.String prompt)
          Returns an Iterator that produces, by calling next, a String containing the next line in the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExamIO

public ExamIO()
Method Detail

readFile

public static java.util.Iterator readFile(java.lang.String prompt)
Returns an Iterator that produces, by calling next, a String containing the next line in the file. Use a StringTokenizer to get the individual tokens from this lline.

Parameters:
prompt - the message to prompt the user for the file name
Returns:
an Iterator that produces, by calling next, a String containing the next line in the file