Assignment #47 Two More Questions

Code

    /// Name: John Huh
    /// Period: 6
    /// Program Name: Two More Questions
    /// File Name: TwoMoreQuestions.java
    /// Date Finished: 10/28/2015

        import java.util.Scanner;
      
        public class TwoMoreQuestions
       {
           public static void main( String[] args )
           {
             
                Scanner keyboard = new Scanner(System.in);
                String a1, a2;
            
                System.out.println( "TWO MORE QUESTIONS!" );
                System.out.println();
                System.out.println( "Think of something and I'll try to guess it!" );
                System.out.println();
                System.out.print( "Question 1: Does it stay inside or outside or both? " );
                a1 = keyboard.next();
                System.out.print( "Question 2: Is it a living thing? " );
                a2 = keyboard.next();
                System.out.println();
            
                if ( a1.equals("inside") && a2.equals("yes") )
                {
                    System.out.println( "Then what else could it be other than a houseplant?!?" );
                }
            
                if ( a1.equals("outside") && a2.equals("yes") )
                {
                    System.out.println( "Then what else could it be other than a bison?!?" );
                }
            
                if ( a1.equals("both") && a2.equals("yes") )
                {
                    System.out.println( "Then what else could it be other than a dog?!?" );
                }
            
                if ( a1.equals("inside") && a2.equals("no") )
                {
                    System.out.println( "Then what else could it be other than a shower curtain?!?" );
                }
            
                if ( a1.equals("outside") && a2.equals("no") )
                {
                    System.out.println( "Then what else could it be other than a billboard?!?" );
                }
            
                if ( a1.equals("both") && a2.equals("no") )
                {
                    System.out.println( "Then what else could it be other than a cell phone?!?" );
                }
            
            }
        }
    

Picture of the output

Assignment 1