Package com.mckoi.util
Class ShellUserTerminal
java.lang.Object
com.mckoi.util.ShellUserTerminal
- All Implemented Interfaces:
UserTerminal
An implementation of UserTerminal that uses the shell terminal via
System.in and System.out.
- Author:
- Tobias Downer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Asks the user a question from the 'question' string.void
Outputs a string of information to the terminal.void
Outputs a string of information and a newline to the terminal.
-
Constructor Details
-
ShellUserTerminal
public ShellUserTerminal()
-
-
Method Details
-
print
Description copied from interface:UserTerminal
Outputs a string of information to the terminal.- Specified by:
print
in interfaceUserTerminal
-
println
Description copied from interface:UserTerminal
Outputs a string of information and a newline to the terminal.- Specified by:
println
in interfaceUserTerminal
-
ask
Description copied from interface:UserTerminal
Asks the user a question from the 'question' string. The 'options' list is the list of options that the user may select from. The 'default_answer' is the option that is selected by default.- Specified by:
ask
in interfaceUserTerminal
-