Match the meaning now uses lists rather than arrays
This commit is contained in:
parent
80b5ac99b7
commit
8c4bb12d46
1 changed files with 6 additions and 3 deletions
|
@ -2,14 +2,17 @@ package uk.ac.aber.cs22120.group20.selfassessment;
|
|||
|
||||
import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class MatchTheMeaningQuestion extends Question {
|
||||
private DictionaryEntry[] correctAnswer;
|
||||
private ArrayList<DictionaryEntry> correctAnswer = new ArrayList<>();
|
||||
|
||||
public MatchTheMeaningQuestion(DictionaryEntry[] correctAnswer){
|
||||
this.correctAnswer = correctAnswer;
|
||||
this.correctAnswer.addAll(Arrays.asList(correctAnswer));
|
||||
}
|
||||
|
||||
public DictionaryEntry[] getCorrectAnswer() {
|
||||
public ArrayList<DictionaryEntry> getCorrectAnswer() {
|
||||
return correctAnswer;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue