|
|
|
@ -12,13 +12,15 @@
|
|
|
|
|
private string $cAnswer;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param int $id_question
|
|
|
|
|
* @param string $question
|
|
|
|
|
* @param string $answerA
|
|
|
|
|
* @param string $answerB
|
|
|
|
|
* @param string $answerC
|
|
|
|
|
* @param string $answerD
|
|
|
|
|
* @param string $cAnswer
|
|
|
|
|
* Constructor to initialize the QuestionEntity object.
|
|
|
|
|
*
|
|
|
|
|
* @param int $id_question The ID of the question.
|
|
|
|
|
* @param string $question The question text.
|
|
|
|
|
* @param string $answerA The text for answer A.
|
|
|
|
|
* @param string $answerB The text for answer B.
|
|
|
|
|
* @param string $answerC The text for answer C.
|
|
|
|
|
* @param string $answerD The text for answer D.
|
|
|
|
|
* @param string $cAnswer The correct answer.
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(int $id_question, string $question, string $answerA, string $answerB, string $answerC, string $answerD, string $cAnswer)
|
|
|
|
|
{
|
|
|
|
@ -32,7 +34,9 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return int
|
|
|
|
|
* Get the ID of the question.
|
|
|
|
|
*
|
|
|
|
|
* @return int The ID of the question.
|
|
|
|
|
*/
|
|
|
|
|
public function getIdQuestion(): int
|
|
|
|
|
{
|
|
|
|
@ -40,7 +44,9 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param int $id_question
|
|
|
|
|
* Set the ID of the question.
|
|
|
|
|
*
|
|
|
|
|
* @param int $id_question The ID of the question.
|
|
|
|
|
*/
|
|
|
|
|
public function setIdQuestion(int $id_question): void
|
|
|
|
|
{
|
|
|
|
@ -48,7 +54,9 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
* Get the question text.
|
|
|
|
|
*
|
|
|
|
|
* @return string The question text.
|
|
|
|
|
*/
|
|
|
|
|
public function getQuestion(): string
|
|
|
|
|
{
|
|
|
|
@ -56,7 +64,9 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param string $question
|
|
|
|
|
* Set the question text.
|
|
|
|
|
*
|
|
|
|
|
* @param string $question The question text.
|
|
|
|
|
*/
|
|
|
|
|
public function setQuestion(string $question): void
|
|
|
|
|
{
|
|
|
|
@ -64,7 +74,9 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
* Get the text for answer A.
|
|
|
|
|
*
|
|
|
|
|
* @return string The text for answer A.
|
|
|
|
|
*/
|
|
|
|
|
public function getAnswerA(): string
|
|
|
|
|
{
|
|
|
|
@ -72,7 +84,9 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param string $answerA
|
|
|
|
|
* Set the text for answer A.
|
|
|
|
|
*
|
|
|
|
|
* @param string $answerA The text for answer A.
|
|
|
|
|
*/
|
|
|
|
|
public function setAnswerA(string $answerA): void
|
|
|
|
|
{
|
|
|
|
@ -80,7 +94,9 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
* Get the text for answer B.
|
|
|
|
|
*
|
|
|
|
|
* @return string The text for answer B.
|
|
|
|
|
*/
|
|
|
|
|
public function getAnswerB(): string
|
|
|
|
|
{
|
|
|
|
@ -88,7 +104,9 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param string $answerB
|
|
|
|
|
* Set the text for answer B.
|
|
|
|
|
*
|
|
|
|
|
* @param string $answerB The text for answer B.
|
|
|
|
|
*/
|
|
|
|
|
public function setAnswerB(string $answerB): void
|
|
|
|
|
{
|
|
|
|
@ -96,7 +114,9 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
* Get the text for answer C.
|
|
|
|
|
*
|
|
|
|
|
* @return string The text for answer C.
|
|
|
|
|
*/
|
|
|
|
|
public function getAnswerC(): string
|
|
|
|
|
{
|
|
|
|
@ -104,7 +124,9 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param string $answerC
|
|
|
|
|
* Set the text for answer C.
|
|
|
|
|
*
|
|
|
|
|
* @param string $answerC The text for answer C.
|
|
|
|
|
*/
|
|
|
|
|
public function setAnswerC(string $answerC): void
|
|
|
|
|
{
|
|
|
|
@ -112,7 +134,9 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
* Get the text for answer D.
|
|
|
|
|
*
|
|
|
|
|
* @return string The text for answer D.
|
|
|
|
|
*/
|
|
|
|
|
public function getAnswerD(): string
|
|
|
|
|
{
|
|
|
|
@ -120,7 +144,9 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param string $answerD
|
|
|
|
|
* Set the text for answer D.
|
|
|
|
|
*
|
|
|
|
|
* @param string $answerD The text for answer D.
|
|
|
|
|
*/
|
|
|
|
|
public function setAnswerD(string $answerD): void
|
|
|
|
|
{
|
|
|
|
@ -128,7 +154,9 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
* Get the correct answer.
|
|
|
|
|
*
|
|
|
|
|
* @return string The correct answer.
|
|
|
|
|
*/
|
|
|
|
|
public function getCAnswer(): string
|
|
|
|
|
{
|
|
|
|
@ -136,13 +164,12 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param string $cAnswer
|
|
|
|
|
* Set the correct answer.
|
|
|
|
|
*
|
|
|
|
|
* @param string $cAnswer The correct answer.
|
|
|
|
|
*/
|
|
|
|
|
public function setCAnswer(string $cAnswer): void
|
|
|
|
|
{
|
|
|
|
|
$this->cAnswer = $cAnswer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|