Homework Assignment #4 [30 points + 5 points extra credit]


Overview

In this assignment we enhance the ics432imgapp application so that the job window has a progress bar, and so that the application displays useful statistics.

In this assignment you have to use GitHub Issues as follows:

How/What to turn in


Question #1 [5 pts - EXTRA CREDIT]: A progress bar in the Job window

Create and address the following GitHub issue:

Issue Title: Add a progress bar to the Job window

Issue Label: new feature

Issue Description: While a job is running, show a progress bar somewhere in the job window, which is hidden once the job has completed/failed.

Note: See this simple JavaFX program that demonstrates the basic usage of a progress bar.

Warning: If you encounter a “frozen” application bug, it could very well be because you have a thread do something that should be done in the JavaFX Application thread (such as updates of GUI elements’ states).


Question #2 [30 pts]: Displaying Statistics

Create and address the following GitHub issue:

Issue Title: Adding a display of Statistics

Issue Label: new feature

Issue Description: Add a “Show Statistics” button to the main window that, whenever clicked, pops up a closable window. The button is disabled while the window is opened. This window should display the following real-time (i.e., dynamically updated) information:

Hint: The way to go about this is to encapsulate the statistics data as part of some “statistics” object with some thread-safe way to add/update statistics. This is because different job threads need to contribute their statistics as they run.

Note: Canceled jobs do not contribute to the “total number of executed jobs” nor to the “average compute speed” statistic. They do contribute to the other statistics (as after all they have done some work).

To do: In your README file succinctly explain your design, referencing the source file that contains your “statistics” class; explain how you ensured thread-safety.