Operation

You will be creating a game that two people can play called Going for Gold.

The application will work as follows:

  • Starting with player 1, each player gets a turn at answering five trivia questions. (There are a total of 10 questions).
  • When a question is displayed on the console, four possible answers are also displayed. Only one of the answers is correct, and if the player selects the correct answer he or she earns a point.
  • After answers, have been selected for all the questions, the program displays the number of points earned by each player and declares the player with the highest number of points the winner.

Specifications

  • In this program, you will design a Question class to hold the data for a trivia question.
  • The Question class should have the member variables for the following data:
    • 1)A trivia question
    • 2)Possible answer 1
    • 3)Possible answer 2
    • 4)Possible answer 3
    • 5)Possible answer 4
    • 6)The number of the correct answer (1, 2, 3, or 4)
  • The Question class should have appropriate constructor(s), accessor, and mutator functions. The program should create an array of 10 Question objects, one for each trivia question.
  • The trivia questions are stored in a file called trivia.txt .

Required

  • Follow best practices
  • Create Junit test cases to test your code
Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.