package week5; /** * Class for 2-choice questions * * Note: for 3+-choice questions one can use MCQuestion. * * @author Camil Staps, s4498062 */ public class TCQuestion extends MCQuestion { /** * Construct a new TCQuestion instance * * @param question the question * @param answer1 the first answer * @param answer2 the second answer * @param correctAnswer 0 if answer1 is correct, 1 if answer2 is correct * @param weight the weight for this question */ public TCQuestion (String question, String answer1, String answer2, int correctAnswer, int weight) { super(question, new String[] {answer1, answer2}, correctAnswer, weight); } /** See the javadoc on the constructor above */ public TCQuestion (String question, String answer1, String answer2, int correctAnswer) { super(question, new String[] {answer1, answer2}, correctAnswer); } /** * For TCQuestions we don't need to randomize the answers. * * @return the new question */ @Override public Question duplicate() { return this; } }