public TestQuestion createTestQuestion(String questionText, Double valor) { if (this.typeExam != ExamType.OPEN_ANSWER) { TestQuestion q = new TestQuestion(questionText, valor); q.setExam(this); this.questions.add(q); return q; } else return null; }
public String print() { String text = ""; text += "Tipo de examen: " + this.typeExam.toString() + " Idioma: " + this.language.toString() + "\n"; for (Question q : this.questions) { text += "1. " + q.getQuestionText() + "\n"; if (this.typeExam == ExamType.MULTITEST || this.typeExam == ExamType.TEST) { TestQuestion tq = (TestQuestion) q; char letra = 'a'; for (Option o : tq.getOptions()) { text += letra + ")" + o.getTextOption() + "\n"; letra++; } text += "\n"; } text += "\n\n"; } return text; }