Class InteractiveIO

java.lang.Object
  |
  +--InteractiveIO

public class InteractiveIO
extends java.lang.Object


Constructor Summary
InteractiveIO()
          sets up the Buffered Reader object to handle keyboard input
 
Method Summary
 java.lang.String promptAndRead(java.lang.String str)
          write str to the monitor.
 void write(java.lang.Object obj)
          write obj using toString() method to the monitor without an end of line at the end
 void write(java.lang.String str)
          write str to the monitor
 void writeln()
          write empty string to the monitor with an end of line character at the end
 void writeln(java.lang.Object obj)
          write obj using toString() method to the monitor with an end of line at the end
 void writeln(java.lang.String str)
          write str to the monitor with an endl of line at the end
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InteractiveIO

public InteractiveIO()
sets up the Buffered Reader object to handle keyboard input
Method Detail

write

public void write(java.lang.String str)
write str to the monitor
Parameters:
String - str the string to be displayed

writeln

public void writeln()
write empty string to the monitor with an end of line character at the end

writeln

public void writeln(java.lang.String str)
write str to the monitor with an endl of line at the end
Parameters:
String - str the string to be displayed

writeln

public void writeln(java.lang.Object obj)
write obj using toString() method to the monitor with an end of line at the end
Parameters:
Object - obj the object to be displayed

write

public void write(java.lang.Object obj)
write obj using toString() method to the monitor without an end of line at the end
Parameters:
Object - obj the object to be displayed

promptAndRead

public java.lang.String promptAndRead(java.lang.String str)
                               throws java.lang.Exception
write str to the monitor. read and return a String from the keyboard using instance variable br
Parameters:
String - str the string to be displayed
Returns:
String input from keyboard or null