import java.util.Scanner;

/************************************************
 * ToolkitTester - This program is a driver designed
 * to exercise the Toolkit class.
 *
 * Note, these are not exhaustive tests
 *
 * @author Nancy Harris
 * @version V1 10/01/2013
 ************************************************/
 public class ToolkitTest
{
/*********************************************
 * main method uses each of the methods in Toolkit at 
 *  least one time
 *
 * @param args Command line arguments, unused in this 
 *             application
 *********************************************/
    public static void main (String args [])
   {
      int		 	iNumber;
      double 		dNumber;
      String		testString;
		String[]		testList;	
		    
      Toolkit 		myTools;		
      Scanner		keyboard;
    
    // Instantiate the objects we need to use
      myTools = new Toolkit();
      keyboard = new Scanner(System.in);
    	testList = new String[3];
		
    // Now test the get methods
      iNumber = myTools.readInteger("Enter an integer: ");
		dNumber = myTools.readDouble("Enter a double number: ");
		System.out.printf("Integer: %d\tDouble: %.2f\n", iNumber, dNumber);
		testString = myTools.readToken("Enter a two word String: ");
		System.out.printf("Token: %s\n", testString);
		testString = myTools.readLine("Enter a two word String: ");
		System.out.printf("Whole line: %s\n", testString);
	
	// Test the other methods
		for (int ii = 0; ii < testList.length; ii++)
		{
			testList[ii] = myTools.getToken(keyboard, "Enter a word: ");
		}
				
		// makePluralS
		System.out.printf("\nmakePluralS: %s\n", myTools.makePluralS(testList[0]));	
		System.out.printf("makePluralS: %s\n", myTools.makePluralS(testList[1]));
		System.out.printf("makePluralS: %s\n", myTools.makePluralS(testList[2]));
		
		// makePluralies
		System.out.printf("\nmakePluralIes: %s\n", myTools.makePluralIes(testList[0]));
		System.out.printf("makePluralIes: %s\n", myTools.makePluralIes(testList[1]));
		System.out.printf("makePluralIes: %s\n", myTools.makePluralIes(testList[2]));
		
      // makePluralEs
		System.out.printf("\nmakePluralEs: %s\n", myTools.makePluralEs(testList[0]));
		System.out.printf("makePluralEs: %s\n", myTools.makePluralEs(testList[1]));
		System.out.printf("makePluralEs: %s\n", myTools.makePluralEs(testList[2]));
		
      // makeSmall
      testList[0] = myTools.makeSmall(testList[0]);
		testList[1] = myTools.makeSmall(testList[1]);
		testList[2] = myTools.makeSmall(testList[2]);
		
		System.out.printf("\nmakeSmall: %s\n", testList[0]);
		System.out.printf("makeSmall: %s\n", testList[1]);
		System.out.printf("makeSmall: %s\n", testList[2]);
		
      // capitalize
		testList[0] = myTools.capitalize(testList[0]);  
		testList[1] = myTools.capitalize(testList[1]);  
		testList[2] = myTools.capitalize(testList[2]);
		  
		System.out.printf("\ncapitalize: %s\n", testList[0]);
		System.out.printf("capitalize: %s\n", testList[1]);
		System.out.printf("capitalize: %s\n", testList[2]);
      
      // makePossessive
  		System.out.printf("\nmakePossessive: %s\n", myTools.makePossessive(testList[0]));
		System.out.printf("makePossessive: %s\n", myTools.makePossessive(testList[1]));
		System.out.printf("makePossessive: %s\n", myTools.makePossessive(testList[2]));
		
      // makePossessiveS
		System.out.printf("\nmakePossessiveS: %s\n", myTools.makePossessiveS(testList[0]));
		System.out.printf("makePossessiveS: %s\n", myTools.makePossesiveS(testList[1]));
		System.out.printf("makePossessiveS: %s\n", myTools.makePossessiveS(testList[2]));


	}
}