Class Input


public class Input extends Object
Input class - to have popup boxes for users to type data Modified from North Toronto Collegiate Institute, Gerry Heffernan: https://ntci.on.ca/compsci/hef/ics3/ch1/1_4.html
  • Constructor Details

    • Input

      public Input()
  • Method Details

    • question

      public static String question(String questionText)
      Generates a pop-up question on the Screen
      Parameters:
      questionText - String prompt for the user (Hint: Use new line escape characters (\n) in your String if it is too long to fit neatly into the box.)
      Returns:
      a String with the Adventurer's answer
    • getString

      public static String getString(String s)
    • getInt

      public static int getInt(String s)
    • getLong

      public static long getLong(String s)
    • getFloat

      public static float getFloat(String s)
    • getDouble

      public static double getDouble(String s)
    • getChar

      public static char getChar(String s)