Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Jeopardy is a well-known trivia game show. On the TV show, there are six different categories of trivia questions (History, Geography, etc.) Each category

imageimage

"Jeopardy" is a well-known trivia game show. On the TV show, there are six different categories of trivia questions (History, Geography, etc.) Each category contains five questions, with different dollar prizes for each question. In the first round, the dollar amounts are $200, $400, $600, $800, and $1000. Usually, the easiest question is worth $200, and the most difficult question is worth $1000. For this project, you will be creating a simple version of Jeopardy with one category (unless you wish to include more). When the game loads, present the user with a welcome message, and ask them for their name. Then, tell the user what category of questions they will be given (all the questions should be related to a similar topic), and ask them to type in the dollar amount they want (200, 400, 600, 800 or 1000). If they do not type in one of these five choices, they should be presented with a message such as "Not a valid choice." and the program should then end. You must use a switch to control what happens based on the dollar amount entered. For each of your five cases, you should present the user with a trivia question. After the user types their answer, check to see if it is correct. If their answer is correct, remind them of how much money they've won. The following are some additional requirements for the project: There must be at least one question where the correct answer is a person's name. For this question, you must accept either their full name or just their last name as correct. There must be at least one question where the correct answer is an integer or a double. For Strings, it shouldn't matter if the correct answer is typed in uppercase or lowercase. If the user types an incorrect answer, be sure to tell them the correct answer afterward. Address the user by name when telling them if their answer was correct or incorrect. You must use if...else statements to check if the user's answers are correct. This means that you will need to place if...else statements inside your switch cases. This is called nesting. Remember to include //comments and a header, as well as an IPO Chart and Variable Chart. For the IPO Chart, switches and if...else statements should be discussed under "Processing." Sample runs of the program: run: Welcome to Java Jeopardy! Please type your name: Bob The category for today's game is Computer Science. Please pick one of the following dollar values: 200, 400, 600, 800, 1000 400 Which Canadian computer scientist designed the first version of Java? James Gosling Correct, Bob! You win $400. BUILD SUCCESSFUL (total time: 5 seconds) run: Welcome to Java Jeopardy! Please type your name: Bob The category for today's game is Computer Science. Please pick one of the following dollar values: 200, 400, 600, 800, 1000 400 Which Canadian computer scientist designed the first version of Java? Gosling Correct, Bob! You win $400. BUILD SUCCESSFUL (total time: 5 seconds) run: Welcome to Java Jeopardy! Please type your name: Bob The category for today's game is Computer Science. Please pick one of the following dollar values: 200, 400, 600, 800, 1000 1000 In what year did Grace Hopper report the first ever computer bug? 1948 Incorrect, Bob. The correct answer was 1947. BUILD SUCCESSFUL (total time: 10 seconds)

Step by Step Solution

3.41 Rating (154 Votes )

There are 3 Steps involved in it

Step: 1

Heres a simple Java program implementing the described requirements import javautilScanner public cl... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Applied Regression Analysis And Other Multivariable Methods

Authors: David G. Kleinbaum, Lawrence L. Kupper, Azhar Nizam, Eli S. Rosenberg

5th Edition

1285051084, 978-1285963754, 128596375X, 978-1285051086

More Books

Students also viewed these Programming questions