Task : Sorting Animation using Multi-threading and JavaFx GUI(10 marks)
Write a multi-threading animation program for selection sort, insertion sort, and bubble sort using JavaFx GUI. Some sample outputs of the program is shown below. Create an array of integers 1,2,…,30 and shuffle the elements of the array randomly. Create a pane to display the array in a histogram. You should invoke each sorting method in a separate thread. Each algorithm uses two nested loops. When the algorithm completes an iteration in the outer loop, put the thread to sleep for 0.8 seconds, and re-display the array in the histogram, color the last bar in the sorted sub-array.
Figure 2a: During sorting operation |
Figure 2b: After completion of sorting operation |
Note: For further clarification and concerns about the assignment, students are recommended to contact with the subject coordinator.
This assessment task will assess the following learning outcome/s:
Items | Full Marks | Pass(PS) | Credit(CR) | Distinction(DI) | High Distinction(HD) |
---|---|---|---|---|---|
Presentation | 1.5 | Very basic presentation (no screen shots are included) | Report with few screen shots is submitted | Report with enough screen shots is submitted | Report with enough screen shots is submitted. The discussion on each screen shot is easy to read and understand. |
Elements of GUI | 2.5 |
Program is not running but the source code indicates the correctness |
Program is running but not showing the GUI properly |
Program is running but not showing all the required components of the GUI properly |
Program is running and showing all the required components of the GUI properly |
Functionality | 6 |
Program is not running but the source code indicates the correctness |
Program is running but not working properly |
Program is running properly but cannot handle unexpected inputs/events |
Program is running and working properly. |
Following items are to be submitted in the Turnitin (For each task):