Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //David Peikrishvili
- //12/14/2015
- import java.util.*;
- public class Chatbot
- {
- public static void main(String[] args)
- {
- Scanner input= new Scanner(System.in);
- System.out.println("*************************");
- System.out.println("Welcome to Lebo\'s chatbot!!!");
- System.out.println("*************************");
- //Question 1)
- System.out.println("Would you like to answer a question?");
- String word = input.nextLine();
- word = word.toUpperCase();
- System.out.println(word);
- 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.println("Really? Oh well.. what is your favorite animal??????");
- else
- System.out.println("You don't know how to answer a Yes or No question??? Fine!!!!! What is your favorite animal??????");
- word = input.nextLine().toUpperCase();
- System.out.println(word);
- System.out.println("What is your favorite food????(Hint--- PIZZA)");
- if (word.equals("PIZZA"))
- System.out.println("Really? Me too :)");
- else if (word.equals("NOTHING"))
- System.out.println("Well.... Too bad, now you will like pizza!!");
- else
- System.out.println("No... YOU LIKE PIZZA!!");
- word = input.nextLine().toUpperCase();
- System.out.println(word);
- System.out.println("What is your favorite color?(Hint--- blue or red");
- if (word.equals("BLUE") || word.equals("RED"))
- System.out.println("You are awesome");
- else if (word.equals("YELLOW") || word.equals("PINK"))
- System.out.println("And now you will like blue :)");
- else
- System.out.println("I said pick a real color not an imaginary one xD");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment