Updated Questions to use standard getters
Questions now have standard getters to get the correct answers
This commit is contained in:
parent
1ccc033759
commit
a0254f5259
3 changed files with 13 additions and 3 deletions
|
@ -3,11 +3,13 @@ package uk.ac.aber.cs22120.group20.selfassessment;
|
|||
import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
|
||||
|
||||
public class MatchTheMeaningQuestion extends Question {
|
||||
DictionaryEntry[] correctAnswer;
|
||||
private DictionaryEntry[] correctAnswer;
|
||||
|
||||
public MatchTheMeaningQuestion(DictionaryEntry[] correctAnswer){
|
||||
this.correctAnswer = correctAnswer;
|
||||
}
|
||||
|
||||
|
||||
public DictionaryEntry[] getCorrectAnswer() {
|
||||
return correctAnswer;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,4 +8,8 @@ public class SixMeaningsQuestion extends Question{
|
|||
private SixMeaningsQuestion(DictionaryEntry correctAnswer) {
|
||||
this.correctAnswer = correctAnswer;
|
||||
}
|
||||
|
||||
public DictionaryEntry getCorrectAnswer() {
|
||||
return correctAnswer;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,9 +5,13 @@ import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
|
|||
import java.util.LinkedList;
|
||||
|
||||
public class TranslationQuestion extends Question {
|
||||
DictionaryEntry correctAnswer;
|
||||
private DictionaryEntry correctAnswer;
|
||||
|
||||
public TranslationQuestion(DictionaryEntry correctAnswer){
|
||||
this.correctAnswer = correctAnswer;
|
||||
}
|
||||
|
||||
public DictionaryEntry getCorrectAnswer() {
|
||||
return correctAnswer;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue