Spy Catcher

Spy Catcher is an on-line multiple choice quiz that asks the user five questions about the US. The user gets five points for each correct answer. If the user misses a question, then he gets a second chance to answer a make-up question. If he answers the make-up question correctly, he receives two points. So for example, if every question is answered correctly, the score is 25. If two questions are missed, then the user is asked two make-up questions. If one make-up question is answered correctly, but not the other, then the score is 3 * 5 + 2 + 0 = 17. If none of the main questions are answered correctly, but all of the make-up questions are answered correctly, then the final score is 5 * 2 = 10.

At the end of the quiz the final score is displayed:

20 - 25 = Too good to be true
15 – 19 = Intentionally missed a few to throw us off
10 – 14 = Maybe private school, worth following
0    9 = Definitely a product of the US educational system

Each question displays four possible answers. For example:

1A. What is the Capitol of Sacramento?

A. California
B. Monterey
C. Japan
D. None of the above

The make-up question might be a bit easier:

1B. Who was the president of the US during the Civil War?

A. Jefferson Davis
B. Arnold Schwarzenegger
C. Abe Lincoln
D. Abe Simpson

Design

There are several ways to design Spy Catcher. The simplest idea is to have one .html page for each question. Thus question1a.html, question1b.html, etc.

Each page contains a form. Use hidden fields within the form to hold the correct answer, the name of the page containing the make-up question, if any, and the name of the page containing the next question to be asked. We could make things more general by also including the value of the question as a hidden field.

All questions send the user's answer to a dispatcher page (dispatcher.jsp). This page uses the implicit session object to keep track of the user's score.