package activity4;

import simpleIO.*;

public class ValidInputTester {

    public static void main(String[] args) {

        //Use this program to test that your ValidInput methods are working.

        Console.print("You must be 18 years or older to enter");
        int age = ValidInput.readIntGreaterThan("Enter your age: ", 18);
        Console.print("You entered : " + age);

        Console.print("\nThe current year is 2020");
        int year = ValidInput.readIntLessThan("What year were you born?", 2020);
        Console.print("You entered : " + year);

        Console.print("\nMonths have, at most, 31 days");
        int day = ValidInput.readIntBetween("What day of the month is it?", 1, 31);
        Console.print("You entered : " + day);


        Console.print("\nDid you know that absolute zero is -273.15 degrees Celsius?");
        double temperature = ValidInput.readDoubleGreaterThan("Enter the temperature: ", -273.15);
        Console.print("You entered : " + temperature);

        Console.print("\nThe posted speed limit is 80.0 km/h");
        double speed = ValidInput.readDoubleLessThan("What is your speed?", 80.0);
        Console.print("You entered: " + speed);

        Console.print("\nYour budget is between $500 and $1000");
        double money = ValidInput.readDoubleBetween("How much money did you spend? ", 500.00, 1000.00);
        Console.print("You entered: " + money);

    }

}
