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:
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).
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:
- The total number of executed jobs, since the application was started
- The total number of successfully processed images in total, since the application was started
- The average compute speed (total MB of input divided by total execution time in seconds, computed when a job completes) for each filter since the application was started (0 if the filter has not been used yet).
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.