DavidPeikrishvili1

Annoying chatbot

Dec 14th, 2015
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.80 KB | None | 0 0
  1. //David Peikrishvili
  2. //12/14/2015
  3.  
  4. import java.util.*;
  5.  
  6. public class Chatbot
  7. {
  8.   public static void main(String[] args)
  9.   {
  10.     Scanner input= new Scanner(System.in);
  11.     System.out.println("*************************");
  12.     System.out.println("Welcome to Lebo\'s chatbot!!!");
  13.     System.out.println("*************************");
  14.     //Question 1)
  15.     System.out.println("Would you like to answer a question?");
  16.     String word = input.nextLine();
  17.    
  18.     word = word.toUpperCase();
  19.     System.out.println(word);
  20.     if (word.equals("YES") || word.equals("Y"))
  21.       System.out.println("Awesome, what is your favorite animal??????");
  22.     else if (word.equals("NO") || word.equals("N"))
  23.        System.out.println("Really? Oh well.. what is your favorite animal??????");
  24.     else
  25.        System.out.println("You don't know how to answer a Yes or No question??? Fine!!!!! What is your favorite animal??????");
  26.     word = input.nextLine().toUpperCase();
  27.     System.out.println(word);
  28.     System.out.println("What is your favorite food????(Hint--- PIZZA)");
  29.     if (word.equals("PIZZA"))
  30.       System.out.println("Really? Me too :)");
  31.     else if (word.equals("NOTHING"))
  32.       System.out.println("Well.... Too bad, now you will like pizza!!");
  33.     else
  34.       System.out.println("No... YOU LIKE PIZZA!!");
  35.     word = input.nextLine().toUpperCase();
  36.     System.out.println(word);
  37.     System.out.println("What is your favorite color?(Hint--- blue or red");
  38.     if (word.equals("BLUE") || word.equals("RED"))
  39.           System.out.println("You are awesome");
  40.     else if (word.equals("YELLOW") || word.equals("PINK"))
  41.       System.out.println("And now you will like blue :)");
  42.     else
  43.       System.out.println("I said pick a real color not an imaginary one xD");
  44.          
  45.    
  46.    
  47.    
  48.    
  49.    
  50.   }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment