Example #1
0
 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);
 }
Example #2
0
 private void setContents(Quiz quiz) {
   removeAllContent();
   titleTxt.setText(quiz.getTitle());
   authorTxt.setText(quiz.getAuthor());
   for (Question question : quiz.getQuestionList()) {
     addQuestion(question);
   }
 }