CS计算机代考程序代写 javaFx Java Exercise 9

Exercise 9
Points 1
Before you start to do your weekly exercise, please make sure that you already go through this week’s lecture slides and tutorial document (can be found in Modules).
What are the exercises?
Please find the Coloured Balls codebase (ColouredBalls.zip) in Module 9 on canvas. In this weekly exercise, you are going to reuse the view you made for Question 2 of tutorial 9 on this coloured balls codebase. Instead of considering complex autonomous vehicles in the tutorial question, in this exercise you will be using the view to show the speeds of each of the balls.
Add a panel under the BallPit in the main window that displays the speed of all balls in pixels per second, using the Observer pattern. Tip: you may begin by printing the speeds to the console at regular intervals, then implementing the JavaFX panel. Ensure you have correctly implemented the Observer pattern to do so.
Note that, coloured balls code was used on exercise 6 for strategy pattern. It doesn’t need to be the strategy-enabled version for this week’s exercise.
What are you expected to do?
Task1: Refactor this codebase by using the Observer design pattern Task2: Model the codebase after refactoring in a UML class diagram What are you expected to submit?
You need to submit two files, including a zip file (NOTE: you need to submit a .zip file instead of .rar or .7z or others) of your refactoring codebase (src folder and build.gradle), and a pdf file of UML class diagram with a brief description on how you applied Observer pattern on your code.
You can submit your solution any time before the due. Please note that, late submission will not be acceptable. 1 mark is awarded to you only if
You apply Observer Pattern correctly on code and UML AND
Your code compiles and runs successfully via gradle build and gradle run

Design Pattern Exercise with Code
Criteria
Ratings
Pts
Description of criterion
1.0 pts Full Marks
Applying requested design pattern(s) correctly on code and UML. Code can be compiled and run successfully.
0.5 pts Half Marks
There are major flaws in applying the design pattern(s) or code cannot be compiled or cannot be run or not follow the requirement
0.0 pts No Marks
A poor or
minimal
attempt
has been
madeTotal Points: 1.0
1.0 pts