Assignemnt #47 and TwoMoreQuestions Code /// Name: Yordan Rashkov /// Period: 7 /// Program Name: TwoMoreQuestions /// File Name: TwoMoreQuestions.java /// Date Finished: 11/18/2015 import java.util.Scanner; public class TwoMoreQuestions { public static void main(String[] args) { Scanner input = new Scanner(System.in); String selection1, selection2, result = ""; System.out.print("Does it stay \"inside\", \"outside\", or \"both\"? "); selection1 = input.nextLine(); System.out.print("Is it a living thing? \"Yes\" or \"no\"? "); selection2 = input.nextLine(); if (selection1.equalsIgnoreCase("inside") && selection2.equalsIgnoreCase("yes")) { result = "Kitten"; } if (selection1.equalsIgnoreCase("inside") && selection2.equalsIgnoreCase("no")) { result = "TV"; } if (selection1.equalsIgnoreCase("outside") && selection2.equalsIgnoreCase("yes")) { result = "Owl"; } if (selection1.equalsIgnoreCase("outside") && selection2.equalsIgnoreCase("no")) { result = "Street Sign"; } if (selection1.equalsIgnoreCase("both") && selection2.equalsIgnoreCase("yes")) { result = "dog"; } if (selection1.equalsIgnoreCase("both") && selection2.equalsIgnoreCase("no")) { result = "Automobile"; } System.out.println("\nYou were probably thinking of a " + result + "."); } }