public Quiz getQuizFromContents() { List<Question> questions = new ArrayList<Question>(); for (QuestionEditor editor : questionEditorList) { questions.add(editor.getQuestionFromContents()); } return new Quiz(titleTxt.getText(), authorTxt.getText(), questions); }
private void setContents(Quiz quiz) { removeAllContent(); titleTxt.setText(quiz.getTitle()); authorTxt.setText(quiz.getAuthor()); for (Question question : quiz.getQuestionList()) { addQuestion(question); } }