/**
 * from package to simplify terminal IO
 * @author Koffman, Wolz
 */

import psJava.ConsoleIn;

/**
 *	Driver for class ConsoleIn
 */
public class ConsoleInDriver {

  /**
    *  main method to test ConsoleIn methods
    */
  public static void main(String[] args) {
     String data = ConsoleIn.readString("Enter name ");
     System.out.println("name is " + data);
     int kids = ConsoleIn.readInt("How many kids ");
     System.out.println("number of kids is " + kids);
     kids = ConsoleIn.readInt("How many kids ", 1, 5);
     System.out.println("number of kids is " + kids);
     double sal = ConsoleIn.readDouble("Enter salary $");
     System.out.println("Salary is " + sal);
     sal = ConsoleIn.readDouble("Enter salary $", 500.0, 1000.0);
     System.out.println("Salary is " + sal);
     char ch = ConsoleIn.readChar("enter letter");
     System.out.println("letter is " + ch);
     ch = ConsoleIn.readChar("enter letter", 'a', 'z');
     System.out.println("letter is " + ch);
     boolean bool = ConsoleIn.readBoolean("Your status is single");
     System.out.println("single status is " + bool);
     bool = ConsoleIn.readBoolean("Are you single", "yes", "no");
     System.out.println("single status is " + bool);
     String[] choices = {"black", "cream only", "sugar only", "cream & sugar"};
     int coffee = ConsoleIn.readChoice("Select a coffee choice", choices);
     System.out.println("choice is " + coffee);
  }
}




