Practice Program 5.4 asked you to define a Trivia class that contained strings representing a trivia question

Question:

Practice Program 5.4 asked you to define a Trivia class that contained strings representing a trivia question and answer to that question. Add an integer for the number of points that the question is worth if the player gets the question right. Create constructor, accessor, and mutator methods. Use this class in a program that creates an array of 10 Trivia objects. You can select questions, answers, and point values of your choice. Make a loop that asks each trivia question to the player, input an answer, output whether the answer is correct or incorrect (if incorrect also output the correct answer), and after all questions have been asked output the user’s score.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: