An Arithmetic Tutor Application
Now you will create a simple arithmetic tutor that behaves like this:
Upon launching, a page displays with the prominent message:
Welcome to the Arithmetic Tutor.
Please choose an operation.
Beneath the message are four buttons labeled Add, Subtract,
Multiply, and Divide. When the user clicks one, a new page is
displayed showing:
- The name of the chosen operation
- A randomly chosen question for that operation, for example,
9 + 8 = ?
- An input field for the user's answer
- A Submit button for the answer
- The correct answer for the most recently answered question
- The number of questions of this type attempted
- The number of questions of this type correct
- The percentage of questions answered correctly
- A Done button
Obviously, this user interface could be improved. For example, what should
happen on invalid input? For now, you need not be concerned with input
validation. With what we know about JSF so far, this will do.