public class XConsole extends java.lang.Object implements IConsole
Constructor and Description |
---|
XConsole()
Public standard-constructor for objects of Type XConsole.
|
Modifier and Type | Method and Description |
---|---|
int |
readInteger()
Input of an integral number.
|
int |
readInteger(java.lang.String prompt)
Input of an integral number.
|
float |
readNumber()
Input of a floating-point number.
|
float |
readNumber(java.lang.String prompt)
Input of a floating-point number.
|
java.lang.String |
readText()
Input of a line of text.
|
java.lang.String |
readText(java.lang.String prompt)
Input of a line of text.
|
void |
write(float number)
Output of a floating-point number without line break.
|
void |
write(int integer)
Output of an integral number without line break.
|
void |
write(java.lang.String text)
Output of text without line break.
|
void |
writeLine(float number)
Output of a floating-point number with line break.
|
void |
writeLine(int integer)
Output of an integral number with line break.
|
void |
writeLine(java.lang.String text)
Output of text with line break.
|
public XConsole()
public int readInteger()
IConsole
readInteger
in interface IConsole
public int readInteger(java.lang.String prompt)
IConsole
readInteger
in interface IConsole
prompt
- the prompt that is displayed to the user prior to the inputpublic float readNumber()
IConsole
readNumber
in interface IConsole
public float readNumber(java.lang.String prompt)
IConsole
readNumber
in interface IConsole
prompt
- the prompt that is displayed to the user prior to the inputpublic java.lang.String readText()
IConsole
public java.lang.String readText(java.lang.String prompt)
IConsole
public void write(float number)
IConsole
public void write(int integer)
IConsole
public void write(java.lang.String text)
IConsole
public void writeLine(float number)
IConsole
public void writeLine(int integer)
IConsole