import java.util.Scanner;
/**
 * Testing Class - run test Java code.
 * @author Alvin Chao
 * @version 9-27-16
 * acknowledgements: I certify this is my own work and that I did not 
 * receive any help on this assignment. 
 * I recived help from TA Casey withe the readNumber method.
 */
public class Testing {
/**
 * readNumber - read in a double number.
 * @param prompt = String type prompt for user input.
 * @return readInDouble = double that is read in from 
 * keyboard via Scanner class.
 */

    public static double readNumber(String prompt) {
        double myReadInDouble;
        System.out.print(prompt);
        //Scanner
        //Declarations
        Scanner keyboard;
        //Initialization
        keyboard = new Scanner(System.in);
        myReadInDouble = keyboard.nextDouble();
        return myReadInDouble;
    }

 /**
 * Main - run main methods.
 * @param args not used.
 */
    public static void main(String[] args) {
        //Declarations
        int dayOfYearInteger;
        double myReturnedDouble;
        myReturnedDouble = readNumber("Enter in the day of the "
            + "year as a double: ");
        dayOfYearInteger = (int) myReturnedDouble;
        System.out.println("Double\t\tInteger");
        System.out.println("------\t\t-------");
        System.out.printf("%.2f\t\t%d\n", myReturnedDouble, dayOfYearInteger);
    }
}
