Interface UserTerminal

All Known Implementing Classes:
ShellUserTerminal

public interface UserTerminal
An interface that represents a terminal that is asked questions in human and machine understandable terms, and sends answers. This interface is intended for an interface in which the user is asked questions, or for an automated tool.
Author:
Tobias Downer
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    ask(String question, String[] options, int default_answer)
    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.
  • Method Details

    • print

      void print(String str)
      Outputs a string of information to the terminal.
    • println

      void println(String str)
      Outputs a string of information and a newline to the terminal.
    • ask

      int ask(String question, String[] options, int default_answer)
      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.