|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--analysis.java.KeyboardInput
Class to handle keyboard input. Can prompt for user input; convert input string into numbers; and picks up conversion errors.
| Constructor Summary | |
KeyboardInput()
Creates a keyboardInput object that handles prompting and conversion of keyboard input. |
|
| Method Summary | |
double |
getDouble()
Extracts a double precision number from the keyboard input. |
float |
getFloat()
Extracts a floating point number from the keyboard input. |
int |
getInt()
Extracts an integer number from the keyboard input. |
java.lang.String |
getString()
Extracts a String from the keyboard input. |
void |
prompt(java.lang.String promptText)
Prompts the user to type in something from the keyboard. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public KeyboardInput()
| Method Detail |
public void prompt(java.lang.String promptText)
promptText - Message to prompt input with.public int getInt()
public float getFloat()
public java.lang.String getString()
public double getDouble()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||