import java.util.Scanner;

public class Example4
{
    public static void main(String [] args)
    {
        final int MIN_AGE = 0;
        final int MAX_AGE = 114;
 
        int age = -1;
        Scanner in = new Scanner(System.in);

        System.out.print("Enter your age: ");
        age = in.nextInt();

        System.out.println("Error checking: Approach #1");
        if (age < MIN_AGE)
            System.out.println("Too low");
        if (age > MAX_AGE)
            System.out.println("Too high");
        if ((age >= MIN_AGE) && (age <= MAX_AGE))
            System.out.println("OK");
        System.out.println();

        System.out.println("Error checking: Approach #2");
        if ((age < MIN_AGE) || (age > MAX_AGE))
            System.out.println("Age outside allowable bounds");
        else
            System.out.println("OK");
        System.out.println();

        System.out.println("Part 3: Classifying based on age");
        if (age < MIN_AGE) 
            System.out.println("Unborn"); 
        else if (age < 18)
            System.out.println("Under age");
        else if (age < 65)
            System.out.println("Adult");
        else if (age <= MAX_AGE)
            System.out.println("Senor citizen");
        else
            System.out.println("Broken world record, I think not");
    }
}