Exercise 6
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 Strategy Ball codebase (StrategyBalls.zip) in Module 6 on canvas. In this weekly exercise, you are going to finish Question 2 of tutorial 6 based on this codebase.
What are you expected to do?
Task1: Refactor this codebase by using the Strategy 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 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 Strategy 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 Strategy Pattern correctly AND
Your code compiles and runs successfully via gradle build and gradle run
1/3
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