Assignemnt #44 and 20 Questions Code /// Name: Yordan Rashkov /// Period: 7 /// Program Name: 20Questions /// File Name: 20Questions.java /// Date Finished: 11/10/2015 import java.util.Scanner; public class TwentyQuestions { public static void main( String[] args ) { Scanner keyboard = new Scanner(System.in); String Question1, Question2; System.out.println(); System.out.println(); System.out.println( "TWO QUESTIONS!" ); System.out.println(); System.out.println(); System.out.println( "Think of an object and I'll try to guess it!" ); System.out.println(); System.out.println( " Question1 : Is it animal, vegetable, or mineral? " ); System.out.println(); Question1 = keyboard.next(); System.out.println(); System.out.println(); System.out.println(); System.out.println( " Question2 : Is it bigger than a breadbox? " ); System.out.println(); Question2 = keyboard.next(); System.out.println(); System.out.println(); System.out.println(); if ( Question1.equals("animal") && Question2.equals("yes") ); { System.out.println( " I'M GUESSING YOU'RE THINKING OF A SQUIRREL!!! Well, I actually don't care anyways... " ); } if ( Question1.equals("animal") && Question2.equals("no") ); { System.out.println( " I'M GUESSING YOU'RE THINKING OF A MOUSE!!! Well, I actually don't care anyways... " ); } if ( Question1.equals("vegetable") && Question2.equals("yes") ); { System.out.println( " I'M GUESSING YOU'RE THINKING OF A CARROT!!! Well, I actually don't care anyways... " ); } if ( Question1.equals("vegetable") && Question2.equals("no") ); { System.out.println( " I'M GUESSING YOU'RE THINKING OF A WATERMELON!!! Well, I actually don't care anyways... " ); } if ( Question1.equals("mineral") && Question2.equals("yes") ); { System.out.println( " I'M GUESSING YOU'RE THINKING OF A PAPERCLIP!!! Well, I actually don't care anyways... " ); } if ( Question1.equals("mineral") && Question2.equals("no") ); { System.out.println( " I'M GUESSING YOU'RE THINKING OF A CAMARO!!! Well, I actually don't care anyways... " ); } System.out.println(); System.out.println(); System.out.println(); System.out.println( "HAVE A GOOD ONE!" ); } }