IO
Class RedmondMsgInBasic

java.lang.Object
  |
  +--IO.RedmondMsgInBasic

public class RedmondMsgInBasic
extends java.lang.Object


Constructor Summary
RedmondMsgInBasic()
          Creates a new instance of RedmondMsgInBasic
 
Method Summary
static void main(java.lang.String[] args)
           
static java.lang.String readString(java.lang.String message)
          Use msg boxes to ask user for a valid string answer Strings are not validated here - accepts any string Given: message to display to the user Returns: the answer entered
static double readValid(java.lang.String message, double min, double max)
          Use msg boxes to ask user for a valid double Continues asking until a valid double is entered Does not handle totally bad input (e.g.
static int readValid(java.lang.String message, int min, int max)
          Use msg boxes to ask user for a valid integer Continues asking until a valid integer is entered Does not handle totally bad input (e.g.
static double readValidDouble(java.lang.String message, double min, double max)
          Use msg boxes to ask user for a valid double Continues asking until a valid double is entered Does not handle totally bad input (e.g.
static int readValidInt(java.lang.String message, int min, int max)
          Use msg boxes to ask user for a valid integer Continues asking until a valid integer is entered Does not handle totally bad input (e.g.
static char readValidYN(java.lang.String message)
          Use msg boxes to ask user for a valid Yes or No answer Continues asking until a valid answer is entered Accepts 'y', 'Y', 'n', 'N', "yes", "no" etc Given: message to display to the user Returns: the valid answer entered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RedmondMsgInBasic

public RedmondMsgInBasic()
Creates a new instance of RedmondMsgInBasic

Method Detail

readValidInt

public static int readValidInt(java.lang.String message,
                               int min,
                               int max)
Use msg boxes to ask user for a valid integer Continues asking until a valid integer is entered Does not handle totally bad input (e.g. entering a letter or a decimal number) Given: message to display to the user lowest valid response highest valid response Returns: the valid integer entered


readValid

public static int readValid(java.lang.String message,
                            int min,
                            int max)
Use msg boxes to ask user for a valid integer Continues asking until a valid integer is entered Does not handle totally bad input (e.g. entering a letter or a decimal number) Made available as an easier name than readValidInt Given: message to display to the user lowest valid response highest valid response Returns: the valid integer entered


readValidDouble

public static double readValidDouble(java.lang.String message,
                                     double min,
                                     double max)
Use msg boxes to ask user for a valid double Continues asking until a valid double is entered Does not handle totally bad input (e.g. entering a letter or nothing) Made available as a different name than readValid Given: message to display to the user lowest valid response highest valid response Returns: the valid double entered


readValid

public static double readValid(java.lang.String message,
                               double min,
                               double max)
Use msg boxes to ask user for a valid double Continues asking until a valid double is entered Does not handle totally bad input (e.g. entering a letter) Given: message to display to the user lowest valid response highest valid response Returns: the valid integer entered


readValidYN

public static char readValidYN(java.lang.String message)
Use msg boxes to ask user for a valid Yes or No answer Continues asking until a valid answer is entered Accepts 'y', 'Y', 'n', 'N', "yes", "no" etc Given: message to display to the user Returns: the valid answer entered


readString

public static java.lang.String readString(java.lang.String message)
Use msg boxes to ask user for a valid string answer Strings are not validated here - accepts any string Given: message to display to the user Returns: the answer entered


main

public static void main(java.lang.String[] args)
Parameters:
args - the command line arguments little test driver