Open book exam

This is an open book, open note exam. You are welcome to refer to any of my examples from the course web site during this exam.

The problem

Write an FXML application that implements an arithmetic quiz.

The user interface for your application should include

To answer a question the user will click on one of the problems in the list to select it, enter an answer in the text field, and then click the "Check Answer" button.

The application will then show the correct answer to the problem and update the label at the bottom that shows how many problems the user got right. Also, clicking the "Check Answer" button removes the selected problem from the list of problems.

Helpful stuff

Your program should read a list of problems from a text file. Here is some text you can put in that file.

To read one of the problems from the text file you can use a Scanner. If your Scanner variable is input you would use the code

String problem = input.nextLine();

to read the problem. To split the problem into a question part and an answer part you can use the code

String parts[] = problem.split("=");

parts[0] will then contain the question and parts[1] will contain the answer.