Question: C++ code that simulates trivia game results. It has two classes one for Game and one for Counting. The Game classes has three integers between

C++ code that simulates trivia game results. It has two classes one for Game and one for Counting.

The Game classes has three integers between 0-1 for no or yes answer for the trivia game questions. Each int can contain a 0 or 1 respectively. It uses a function for setting and getting the question results. Then the second class Counting maintains the number of players. It has six ints for the total # of yes's or no's for each question. So if I ask "Is the ocean bigger than a sea" the player would answer either 0 for no or 1 for yes. The class has a function to add one of the integers to each game results. A constructor to initialize the six integers. Class Counting would also call class game for each game result. Class counting then displays the results to the screen. Then in the main program, declaring class Counting it asks the users to input how many people are playing and then their answers to the questions in Games class.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!