Assignment 47: Two More Questions

Code

    /// Name: Ryan McAteer
    /// Period: 5
    /// Program Name: Two More Questions
    /// File Name: Assignment47.java
    /// Date Finished: 10/28/15

import java.util.Scanner;

class Assignment47
{
      public static void main(String[] args) 
      {
          
          Scanner keyboard = new Scanner(System.in);
          
          String answer1, answer2;
          
          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.println( "Question 1) Does it stay [inside] or [outside] or [both]?" );
          answer1 = keyboard.next();
          System.out.println( "Question 2) Is it a living thing?" );
          answer2 = keyboard.next();
          System.out.println();
          if ( answer1.equals("inside") && answer2.equals("yes") )
          {
              System.out.println( "Then what else could you be thinking of besides a houseplant?!?" );
          }
          if ( answer1.equals("inside") && answer2.equals("no") )
          {
              System.out.println( "Then what else could you be thinking of besides a shower curtain?!?" );
          }
          if ( answer1.equals("outside") && answer2.equals("yes") )
          {
              System.out.println( "Then what else could you be thinking of besides a bison?!?" );
          }
          if ( answer1.equals("outside") && answer2.equals("no") )
          {
              System.out.println( "Then what else could you be thinking of besides a billboard?!?" );
          }
          if ( answer1.equals("both") && answer2.equals("yes") )
          {
              System.out.println( "Then what else could you be thinking of besides a dog?!?" );
          }
          if ( answer1.equals("both") && answer2.equals("no") )
          {
              System.out.println( "Then what else could you be thinking of besides a cell phone?!?" );
          }
      }
}


    

Picture of the output

This should work