I have to create a quiz program in C++. It should have two classes. The first class called 'question' should hold all data and methods for a single question and the second class called 'quiz' should hold an array of questions, obtain the users answer and display there score.
Im not sure if im on the right track or not, and not sure how to go about adding the questions and answers etc.
Here is what i have done so far:
Im not sure if im on the right track or not, and not sure how to go about adding the questions and answers etc.
Here is what i have done so far:
Code:
class question
{
public:
string question;
string possAnswers;
int marks;
string comment;
string usersAnswer;
int usersScore;
void displayQuestion(string question);
void usersAnswer(string usersAnswer);
void usersScore(int usersScore);
void displayComments(string comment);
};
class quiz
{
string q [];
void totalScore();
void displayComments();
};