Advertisement
MelindaElezovic

ChatBox

Dec 14th, 2015
474
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.26 KB | None | 0 0
  1. //Melinda
  2. //12/14/15
  3. //ChatBox
  4. import java.util.*;
  5.  
  6. public class ChatBox
  7. {
  8.   public static void main(String[] args)
  9.   {
  10.     Scanner input = new Scanner(System.in);
  11.     //intro screen
  12.     System.out.println("***********************************");
  13.     System.out.println("Welcome to Melinda\'s ChatBox!!!!!!");
  14.     System.out.println("***********************************");
  15.     //question 1
  16.     System.out.print("Would you like to answer a question?");
  17.     String word = input.nextLine();
  18.     word =word.toUpperCase();
  19.     if (word.equals("YES")|| word.equals("Y"))
  20.       System.out.println("Awesome, what is your favorite animal?");
  21.     else if (word.equals("NO") || word.equals("N"))
  22.       System.out.print("Really? Oh well, what is your favorite animal?");
  23.     else
  24.       System.out.println("You dont know how to answer a simple Yes or No question? What is your favorite animal?");
  25.     //question 2 Capture
  26.     System.out.println("What is your favorite color?");
  27.     String color = input.nextLine();
  28.     color = color.toUpperCase();
  29.     if (color.equals("BLUE"))
  30.       System.out.println("I hate the color blue!");
  31.     else if (color.equals("Black"))
  32.       System.out.println("I love the color black, it goes with everything!");
  33.     else
  34.       System.out.println("You\'re different most people say blue or black");
  35.     //question 3
  36.     System.out.println("How are you doing today?");
  37.     String feeling = input.nextLine();
  38.     feeling = feeling.toUpperCase();
  39.     if (feeling.equals("GOOD") || feeling.equals("FINE"))
  40.       System.out.println("That\'s great");
  41.     else if (feeling.equals("BAD") || feeling.equals("TERRIBLE"))
  42.       System.out.println("That sucks, but I am having a great day, thanks for asking.");
  43.     else
  44.       System.out.println("I am just going to ask you one last question");
  45.     //question 4
  46.     System.out.println("Would you rather drive a BMW X6 or a Mercedes GLE Coupe?");
  47.     String car = input.nextLine();
  48.     car= car.toUpperCase();
  49.     if (car.equals("BMW X6"))
  50.       System.out.println("I like that one better too!");
  51.     else if (car.equals("Mercedes GLE Coupe"))
  52.       System.out.println("Really? I like the BMW X6 way better");
  53.     else
  54.       System.out.println("Why don\'t you just answer the question?");
  55.    
  56.    
  57.   }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement