Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.harrisonfreni.ExtraCredit;
- import java.util.Scanner;
- public class halloween
- {
- public static void main(String[] args)
- {
- // Pre-Init
- Scanner input = new Scanner(System.in);
- // 1. Start Game
- game();
- // 7. Retry?
- System.out.println("Would you like to try again? Y/N ");
- String retry = input.nextLine();
- while(retry.equalsIgnoreCase("Y"))
- {
- game();
- }
- }
- public static void game()
- {
- // Pre-Init
- Scanner input = new Scanner(System.in);
- int i = 0;
- // 1. First Question
- System.out.println("Which Candies Are Most Popular? ");
- System.out.println("A. Kitkat");
- System.out.println("B. Snickers");
- System.out.println("C. Skittles");
- System.out.println("D. Candy Corn");
- String q1In = input.nextLine();
- if(q1In.equalsIgnoreCase("A"))
- {
- System.out.println("You are wrong");
- }
- if(q1In.equalsIgnoreCase("B"))
- {
- System.out.println("You are wrong");
- }
- if(q1In.equalsIgnoreCase("C"))
- {
- System.out.println("You are wrong");
- }
- if(q1In.equalsIgnoreCase("D"))
- {
- System.out.println("You are correct");
- i++;
- }
- // 2. Second Question
- System.out.println("Where does the moniker \"Halloween\" Come From? ");
- System.out.println("A. The Jews");
- System.out.println("B. The Catholics");
- System.out.println("C. Buddhists");
- System.out.println("D. Pastafarianism");
- String q2In = input.nextLine();
- if(q2In.equalsIgnoreCase("A"))
- {
- System.out.println("You are wrong");
- }
- if(q2In.equalsIgnoreCase("B"))
- {
- System.out.println("You are correct");
- i++;
- }
- if(q2In.equalsIgnoreCase("C"))
- {
- System.out.println("You are wrong");
- }
- if(q2In.equalsIgnoreCase("D"))
- {
- System.out.println("You are wrong");
- }
- // 3. Third Question
- System.out.println("What Was Candy Corn Known As?");
- System.out.println("A. Corn Candy");
- System.out.println("B. Chicken Feed");
- System.out.println("C. The Beacons");
- System.out.println("D. Buttercream Candies");
- String q3In = input.nextLine();
- if(q3In.equalsIgnoreCase("A"))
- {
- System.out.println("You are wrong");
- }
- if(q3In.equalsIgnoreCase("B"))
- {
- System.out.println("You are wrong");
- }
- if(q3In.equalsIgnoreCase("C"))
- {
- System.out.println("You are wrong");
- }
- if(q3In.equalsIgnoreCase("D"))
- {
- System.out.println("You are correct");
- i++;
- }
- // 4. Fourth Question
- System.out.println("How Rare is a Full Moon On Halloween");
- System.out.println("A. Common");
- System.out.println("B. Not That Rare");
- System.out.println("C. Rare");
- System.out.println("D. Extremely Rare");
- String q4In = input.nextLine();
- if(q4In.equalsIgnoreCase("A"))
- {
- System.out.println("You are wrong");
- }
- if(q4In.equalsIgnoreCase("B"))
- {
- System.out.println("You are wrong");
- }
- if(q4In.equalsIgnoreCase("C"))
- {
- System.out.println("You are wrong");
- }
- if(q4In.equalsIgnoreCase("D"))
- {
- System.out.println("You are correct");
- i++;
- }
- // 5. Fifth Question
- System.out.println("What was trick or treating re-popularized by?");
- System.out.println("A. Pumpkin Spice");
- System.out.println("B. Sports");
- System.out.println("C. Cartoons");
- System.out.println("D. The Dead");
- String q5In = input.nextLine();
- if(q5In.equalsIgnoreCase("A"))
- {
- System.out.println("You are wrong");
- }
- if(q5In.equalsIgnoreCase("B"))
- {
- System.out.println("You are wrong");
- }
- if(q5In.equalsIgnoreCase("C"))
- {
- System.out.println("You are correct");
- i++;
- }
- if(q5In.equalsIgnoreCase("D"))
- {
- System.out.println("You are wrong");
- }
- // 6. println Score
- System.out.println("Your score is: " + i);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement