Assignment 47

code

///Name: Mutsu Osoegawa
///Period: 7
///Project Name: Two More Questions
///File Name: TwoMoreQuestions.java
///Date: 10/26/2015

import java.util.Scanner;
public class TwoMoreQuestions
{
    public static void main( String[] args )
    {
        Scanner keyboard = new Scanner(System.in);
        String place, status, thing;
        thing = "a";
        System.out.println( "TWO MORE QUESTIONS, BABY!" );
        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? " );
        place = keyboard.next();
        System.out.print( "Question 2) Is it a living thing? " );
        status = keyboard.next();
        if ( (place.equals("inside")) && (status.equals("yes")) )
        {
            thing = "house plant";
        }
        if ( (place.equals("inside")) && (status.equals("no")) )
        {
            thing = "shower curtain";
        }
        if ( (place.equals("outside")) && (status.equals("yes")) )
        {
            thing = "bison";
        }
        if ( (place.equals("outside")) && (status.equals("no")) )
        {
            thing = "billboard";
        }
        if ( (place.equals("both")) && (status.equals("yes")) )
        {
            thing = "dog";
        }
        if ( (place.equals("both")) && (status.equals("no")) )
        {
            thing = "cell phone";
        }
        System.out.println( "You are thinking of " + thing + "." );
    }
}