Match the meaning now uses lists rather than arrays

This commit is contained in:
law39 2020-04-29 14:06:34 +01:00
parent 80b5ac99b7
commit 8c4bb12d46

View file

@ -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;
}
}