Assignment #37 How Old Are You, Specifically?

Code

    /// Name: John Huh
    /// Period: 6
    /// Program Name: How Old Are You, Specifically?
    /// File Name: HowOldAreYou.java
    /// Date Finished: 10/1/2015

        import java.util.Scanner;
    
        public class HowOldAreYou
        {
            public static void main( String[] args )
            {
            
                Scanner keyboard = new Scanner(System.in);
            
                int age;
                String name;
            
                System.out.print( "Hey, what's your name? (Sorry, I keep forgetting.) " );
                name = keyboard.next();
            
                System.out.print( "Ok, " + name + ", how old are you? " );
                age = keyboard.nextInt();
            
                System.out.println();
            
                if ( age < 16 )
                {
                    System.out.print( "You can't drive, " + name + "." );
                }
            
                else if ( age < 18 )
                {
                    System.out.print( "You can drive, but not vote, " + name + "." );
                }
                else if ( age < 25 )
                {
                    System.out.print( "You can vote, but not rent a car, " + name + "." );
                }
                else
                {
                    System.out.print( "You can do pretty much anything, " + name + "." );
                }
            
                System.out.println();
            }
        }
    

Picture of the output

Assignment 1