I need to make a Java game program where the user picks one of three categories. And each of those categories contain 3 questions but the question chosen is based on a random number generated. The user keeps going until they enter exit. The points awarded for correct answered is displayed at the end

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I need to make a Java game program where the user picks one of three categories. And each of those categories contain 3 questions but the question chosen is based on a random number generated. The user keeps going until they enter exit. The points awarded for correct answered is displayed at the end

Bb 18001355
B Web Protection by Bitdefenc x +
rthos.content.blackboardcdn.com/5cc0bc5a4bb1d/18001355?X-Blackboard-Expiration=164668680...
.1/ 2
+ %66
Instructions:
Welcome the user enthusiastically to the game! Construct a menu containing at least three categories of
questions for the user to select. For example, categories might be Sports, Games, History, Geography, Math,
Music, Movies, etc.
For each category, you must create 3 different possible questions for the user. These are the minimum required
types of questions:
You must include questions that require an answer of each of the following types: numeric, char, or String.
(Place at least one of these questions in each category.) This type question tests the user's answer for an
exact match to the correct answer.
Among your categories, you must include a question that requires testing if the user's answer is in a
specified range, and another question that requires testing if the answer is out of range.
In one category you must include a question based on processing a series of numbers using a for-loop.
To complete the minimum number of nine questions in the quiz, you may duplicate any of the above types
of questions, or create new ones of your own.
The user should be able to select the category of the question, but the exact question chosen for the user to
answer will be based on a "random" number generated (from 1-3).
The user's answer to the question must be compared to the correct answer that you supply in your code.
A correct answer will result in a message of congratulations for the user, and a certain number of points added to
the user's score (you may set your points for correct answers as you wish). Display an appropriate message for
an incorrect answer
You must include both an if-else statement structure and a switch statement in your code.
The game continues until the user wants to stop. How will this be accomplished?
At the end of the game, your code should display the total number of points scored by the user and a "goodbye",
"game over", or similar message of some type.
Lab report
The only part of the Lab Report required for this lab is the algorithm.
2:28 PM
(
3/9/2022
60°F
Transcribed Image Text:Bb 18001355 B Web Protection by Bitdefenc x + rthos.content.blackboardcdn.com/5cc0bc5a4bb1d/18001355?X-Blackboard-Expiration=164668680... .1/ 2 + %66 Instructions: Welcome the user enthusiastically to the game! Construct a menu containing at least three categories of questions for the user to select. For example, categories might be Sports, Games, History, Geography, Math, Music, Movies, etc. For each category, you must create 3 different possible questions for the user. These are the minimum required types of questions: You must include questions that require an answer of each of the following types: numeric, char, or String. (Place at least one of these questions in each category.) This type question tests the user's answer for an exact match to the correct answer. Among your categories, you must include a question that requires testing if the user's answer is in a specified range, and another question that requires testing if the answer is out of range. In one category you must include a question based on processing a series of numbers using a for-loop. To complete the minimum number of nine questions in the quiz, you may duplicate any of the above types of questions, or create new ones of your own. The user should be able to select the category of the question, but the exact question chosen for the user to answer will be based on a "random" number generated (from 1-3). The user's answer to the question must be compared to the correct answer that you supply in your code. A correct answer will result in a message of congratulations for the user, and a certain number of points added to the user's score (you may set your points for correct answers as you wish). Display an appropriate message for an incorrect answer You must include both an if-else statement structure and a switch statement in your code. The game continues until the user wants to stop. How will this be accomplished? At the end of the game, your code should display the total number of points scored by the user and a "goodbye", "game over", or similar message of some type. Lab report The only part of the Lab Report required for this lab is the algorithm. 2:28 PM ( 3/9/2022 60°F
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education