Advertisement
Guest User

Untitled

a guest
Oct 1st, 2014
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.01 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class PhinneasandFerb
  4. {
  5.     public static void main(String[] args) {
  6.         Scanner keyboard = new Scanner(System.in);
  7.  
  8.         String candace, weather;
  9.         boolean candacewatch;
  10.  
  11.         while (candacewatch = true)
  12.         {
  13.             System.out.println("Is Candace watching?");
  14.             candace = keyboard.next();
  15.             if (candace.equals("no") || candace.equals("No") || candace.equals("false") || candace.equals("False"))
  16.             {
  17.                 candacewatch = false;
  18.             }
  19.             else
  20.             {
  21.             System.out.println("Candace is watching. Work on a geometric proof for trisecting an angle by drawing diagrams in the dirt.");
  22.             candacewatch = true;
  23.             }
  24.         }
  25.         System.out.println("Candace is not watching. Go find Issabella, Bueford and Baljeet and build a rollar coaster!");
  26.         System.out.println("The rollar coaster to be built depends on the weather. Is it hot or cold?");
  27.         weather = keyboard.next();
  28.         if (weather.equals("cold") || weather.equals("Cold"))
  29.         {
  30.             System.out.println("Looks like a good time to build \"The Pizza Oven\"!");
  31.             System.out.println("Make sure to include yummy snacks in your construction.");
  32.             System.exit(0);
  33.         }
  34.         else if (weather.equals("hot") || weather.equals("Hot"))
  35.         {
  36.             System.out.println("Looks like a good tiime to build \"The Ice Box\"!");
  37.             System.out.println("Be sure to stock the ride with ice cream sandwices.");
  38.             System.exit(0);
  39.         }
  40.         else
  41.         {
  42.             System.out.println("Since it isn't hot or cold, let's build a log flume and serve fish sticks.");
  43.             System.out.println("I will begin preparation. Would you like your fish sticks \"extra crunchy\" or microwaved?");
  44.             String fishsticks;
  45.             fishsticks = keyboard.next();
  46.             if (fishsticks.equals("extra crunchy") || fishsticks.equals("Extra Crunchy"))
  47.             {
  48.                 System.out.println("I will begin preparation. I expect it to be ready in an hour.");
  49.                 System.exit(0);
  50.             }
  51.             else
  52.             {
  53.                 System.out.println("Okay, I will go ahead and microwave them. They will probably be ready in about five minutes.");
  54.                 System.exit(0);
  55.             }
  56.         }
  57.     }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement