Added constructors for different types of questions.
This commit is contained in:
parent
429417e7f6
commit
4122589f53
3 changed files with 27 additions and 6 deletions
|
@ -1,4 +1,13 @@
|
||||||
package uk.ac.aber.cs22120.group20.selfassessment;
|
package uk.ac.aber.cs22120.group20.selfassessment;
|
||||||
|
|
||||||
|
import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
|
||||||
|
|
||||||
public class MatchTheMeaningQuestion {
|
public class MatchTheMeaningQuestion {
|
||||||
|
DictionaryEntry[] correctAnswer;
|
||||||
|
|
||||||
|
public MatchTheMeaningQuestion(DictionaryEntry[] correctAnswer){
|
||||||
|
this.correctAnswer = correctAnswer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
package uk.ac.aber.cs22120.group20.selfassessment;
|
package uk.ac.aber.cs22120.group20.selfassessment;
|
||||||
|
|
||||||
|
import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
|
||||||
|
|
||||||
public class SixMeaningsQuestion {
|
public class SixMeaningsQuestion {
|
||||||
private static SixMeaningsQuestion ourInstance = new SixMeaningsQuestion();
|
private DictionaryEntry correctAnswer;
|
||||||
|
|
||||||
public static SixMeaningsQuestion getInstance() {
|
private SixMeaningsQuestion(DictionaryEntry correctAnswer) {
|
||||||
return ourInstance;
|
this.correctAnswer = correctAnswer;
|
||||||
}
|
|
||||||
|
|
||||||
private SixMeaningsQuestion() {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
package uk.ac.aber.cs22120.group20.selfassessment;
|
||||||
|
|
||||||
|
import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
|
||||||
|
public class TranslationQuestion {
|
||||||
|
DictionaryEntry correctAnswer;
|
||||||
|
|
||||||
|
public TranslationQuestion(DictionaryEntry correctAnswer){
|
||||||
|
this.correctAnswer = correctAnswer;
|
||||||
|
}
|
||||||
|
}
|
Reference in a new issue