Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Melinda
- //12/14/15
- //ChatBox
- import java.util.*;
- public class ChatBox
- {
- public static void main(String[] args)
- {
- Scanner input = new Scanner(System.in);
- //intro screen
- System.out.println("***********************************");
- System.out.println("Welcome to Melinda\'s ChatBox!!!!!!");
- System.out.println("***********************************");
- //question 1
- System.out.print("Would you like to answer a question?");
- String word = input.nextLine();
- word =word.toUpperCase();
- if (word.equals("YES")|| word.equals("Y"))
- System.out.println("Awesome, what is your favorite animal?");
- else if (word.equals("NO") || word.equals("N"))
- System.out.print("Really? Oh well, what is your favorite animal?");
- else
- System.out.println("You dont know how to answer a simple Yes or No question? What is your favorite animal?");
- //question 2 Capture
- System.out.println("What is your favorite color?");
- String color = input.nextLine();
- color = color.toUpperCase();
- if (color.equals("BLUE"))
- System.out.println("I hate the color blue!");
- else if (color.equals("Black"))
- System.out.println("I love the color black, it goes with everything!");
- else
- System.out.println("You\'re different most people say blue or black");
- //question 3
- System.out.println("How are you doing today?");
- String feeling = input.nextLine();
- feeling = feeling.toUpperCase();
- if (feeling.equals("GOOD") || feeling.equals("FINE"))
- System.out.println("That\'s great");
- else if (feeling.equals("BAD") || feeling.equals("TERRIBLE"))
- System.out.println("That sucks, but I am having a great day, thanks for asking.");
- else
- System.out.println("I am just going to ask you one last question");
- //question 4
- System.out.println("Would you rather drive a BMW X6 or a Mercedes GLE Coupe?");
- String car = input.nextLine();
- car= car.toUpperCase();
- if (car.equals("BMW X6"))
- System.out.println("I like that one better too!");
- else if (car.equals("Mercedes GLE Coupe"))
- System.out.println("Really? I like the BMW X6 way better");
- else
- System.out.println("Why don\'t you just answer the question?");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement