c++ multiple choice quiz
Create a C++ program to run a simple multiple choice quiz on C++. The quiz should have questions such as this:
How do you declare a variable x to be a pointer to a constant integer?
1) int * const x
2) int const * const x
3) int const *x
4) int *x
Select answer (1-4) :>
The program should have two classes called Question and Quiz.
The Question class should hold all the data and methods for a single question with four different possible answers.
It should include fields to hold:
1) The question;
2) The possible answers;
3) The marks for each answer;
4) A comment to give to a user for each choice of answer;
5) The answer selected by the user.
It should have methods to:
1) Display the question;
2) Obtain an answer from the user;
3) Return the userís score;
4) Display the comments.
The Quiz class should hold an array of up to 20 questions. It should have methods to:
1) Present the questions in order;
2) Display the total score;
3) Take the user through their answers showing the correct answer and the comment.
Both classes may have other fields, methods or constructors as appropriate.
You should have a main method that sets up a quiz with 4 questions, runs the quiz and displays the scores and comments.
I have no idea how to create these classes!please help!!
|All times are GMT +5.5. The time now is 06:39.|