Answer Class Reference

#include <MultipleChoiceQuestion.h>


Detailed Description

Class defining a possible answer to a multiple choice question.

Definition at line 40 of file MultipleChoiceQuestion.h.


Public Member Functions

 Answer (string answer, string value, string explanation)
 Constructor.
bool operator== (string x)
 Equality operator.
string getAnswer ()
 Get the answer.
string getValue ()
 Get the value.
string getExplanation ()
 Get the explanation.

Protected Attributes

string mAnswer
 Answer as it should be entered by the user.
string mValue
 Value as it is output to the config file.
string mExplanation
 Explanation shown when '?' is given as an answer.

Constructor & Destructor Documentation

Answer::Answer ( string  answer,
string  value,
string  explanation 
) [inline]

Constructor.

Defines the answer, value and explanation of this answer.

Definition at line 49 of file MultipleChoiceQuestion.h.

References mAnswer, mExplanation, and mValue.


Member Function Documentation

bool Answer::operator== ( string  x  )  [inline]

Equality operator.

Matches on Answer.

Definition at line 59 of file MultipleChoiceQuestion.h.

References mAnswer.

string Answer::getAnswer (  )  [inline]

Get the answer.

Definition at line 66 of file MultipleChoiceQuestion.h.

References mAnswer.

string Answer::getValue (  )  [inline]

Get the value.

Definition at line 74 of file MultipleChoiceQuestion.h.

References mValue.

string Answer::getExplanation (  )  [inline]

Get the explanation.

Definition at line 82 of file MultipleChoiceQuestion.h.

References mExplanation.


Field Documentation

string Answer::mAnswer [protected]

Answer as it should be entered by the user.

Definition at line 88 of file MultipleChoiceQuestion.h.

Referenced by Answer(), getAnswer(), and operator==().

string Answer::mValue [protected]

Value as it is output to the config file.

Definition at line 91 of file MultipleChoiceQuestion.h.

Referenced by Answer(), and getValue().

string Answer::mExplanation [protected]

Explanation shown when '?' is given as an answer.

Definition at line 94 of file MultipleChoiceQuestion.h.

Referenced by Answer(), and getExplanation().


The documentation for this class was generated from the following file:

SourceForge.net Logo
Project space on SourceForge.net