Trivia Game
Have a 10 question quiz on any topic you choose, and at the end
indicate how many they got corerct.
Use Classes to define a series
of multiple choice questions, and their answers.
Define a class called Question, to hold the following information:
- Question
- Choice 1
- Choice 2
- Choice 3
- Correct choice
Declare an array of the questions. For each question, set all it's
values.
- Have the program go through the 10 questions:
- For each display the choices.
- Let the user enter in their choice by entering 1, 2, or 3.
- If the user enters in an invalid number, tell them to try
again. (A switch might be useful here).
- Indicate to the user if they are correct, or incorrect.
- Keep track of how many questions were gotten correct.
- At the end display how many they got correct. Example: 9/10 correct.
Use comments & functions to help
make your code easier to read.