String answerText = request.getParameter("answerText");
if (!question.isValid(answerText)) {
viewQuestion(request, response, "Ongeldig antwoord");
return;
}
Answer answer = new Answer(answerText, question.getScore(answerText));
result.getAnswers().add(answer);
if (result.hasNextQuestion()) {
viewQuestion(request, response, null);
return;
}