Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class PhinneasandFerb
- {
- public static void main(String[] args) {
- Scanner keyboard = new Scanner(System.in);
- String candace, weather;
- boolean candacewatch;
- while (candacewatch = true)
- {
- System.out.println("Is Candace watching?");
- candace = keyboard.next();
- if (candace.equals("no") || candace.equals("No") || candace.equals("false") || candace.equals("False"))
- {
- candacewatch = false;
- }
- else
- {
- System.out.println("Candace is watching. Work on a geometric proof for trisecting an angle by drawing diagrams in the dirt.");
- candacewatch = true;
- }
- }
- System.out.println("Candace is not watching. Go find Issabella, Bueford and Baljeet and build a rollar coaster!");
- System.out.println("The rollar coaster to be built depends on the weather. Is it hot or cold?");
- weather = keyboard.next();
- if (weather.equals("cold") || weather.equals("Cold"))
- {
- System.out.println("Looks like a good time to build \"The Pizza Oven\"!");
- System.out.println("Make sure to include yummy snacks in your construction.");
- System.exit(0);
- }
- else if (weather.equals("hot") || weather.equals("Hot"))
- {
- System.out.println("Looks like a good tiime to build \"The Ice Box\"!");
- System.out.println("Be sure to stock the ride with ice cream sandwices.");
- System.exit(0);
- }
- else
- {
- System.out.println("Since it isn't hot or cold, let's build a log flume and serve fish sticks.");
- System.out.println("I will begin preparation. Would you like your fish sticks \"extra crunchy\" or microwaved?");
- String fishsticks;
- fishsticks = keyboard.next();
- if (fishsticks.equals("extra crunchy") || fishsticks.equals("Extra Crunchy"))
- {
- System.out.println("I will begin preparation. I expect it to be ready in an hour.");
- System.exit(0);
- }
- else
- {
- System.out.println("Okay, I will go ahead and microwave them. They will probably be ready in about five minutes.");
- System.exit(0);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement