edu.cornell.cs.sam.ui
Class SamText

java.lang.Object
  extended by edu.cornell.cs.sam.ui.SamText
All Implemented Interfaces:
Video

public class SamText
extends java.lang.Object
implements Video

This is a front end for executing a SaM program from a console


Constructor Summary
SamText()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 char readChar()
          Request character input from the video implementation
 float readFloat()
          Request floating point input from the video implementation
 int readInt()
          Requests integer input from the video implementation
 java.lang.String readString()
          Request String input from the video implementation
 void writeChar(char a)
          Writes character output to the video implementation
 void writeFloat(float a)
          Writes floating point output to the video implementation
 void writeInt(int a)
          Writes integer output to the video implementation
 void writeString(java.lang.String a)
          Writes string output to the video implementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SamText

public SamText()
Method Detail

main

public static void main(java.lang.String[] args)

readInt

public int readInt()
Description copied from interface: Video
Requests integer input from the video implementation

Specified by:
readInt in interface Video
Returns:
The integer received

readString

public java.lang.String readString()
Description copied from interface: Video
Request String input from the video implementation

Specified by:
readString in interface Video
Returns:
The String received

readChar

public char readChar()
Description copied from interface: Video
Request character input from the video implementation

Specified by:
readChar in interface Video
Returns:
The character received

readFloat

public float readFloat()
Description copied from interface: Video
Request floating point input from the video implementation

Specified by:
readFloat in interface Video
Returns:
The floating point number received

writeInt

public void writeInt(int a)
Description copied from interface: Video
Writes integer output to the video implementation

Specified by:
writeInt in interface Video
Parameters:
a - The integer to be written

writeFloat

public void writeFloat(float a)
Description copied from interface: Video
Writes floating point output to the video implementation

Specified by:
writeFloat in interface Video
Parameters:
a - The float to be written

writeChar

public void writeChar(char a)
Description copied from interface: Video
Writes character output to the video implementation

Specified by:
writeChar in interface Video
Parameters:
a - The character to be written

writeString

public void writeString(java.lang.String a)
Description copied from interface: Video
Writes string output to the video implementation

Specified by:
writeString in interface Video
Parameters:
a - The string to be written