Exercise 2
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?
E1: Please go to Module 2 on canvas and open tutorial 2. In this part, you are going to finish the five questions in Question 1. Feel free to discuss your answers with your tutor or group members during your tutorial, then summarise your answers of these five questions in your report. Besides, considering the following code and explain what you believe is going on during line 4. Ensure you explain your answer from polymorphism perspective.
List
Zoo.addAnimal(myAnimals, new Lion());
Zoo.addAnimal(myAnimals, new Wolf());
Zoo.makeNoise(myAnimals);
E2: Please go to Module 2 on canvas and open tutorial 2. In this part, you are going to finish Question 4 of tutorial 2. We don’t assume you know SOLID principles before and Question 4 of tutorial 2 will be your first “design cake”. Free free to discuss with your tutor or group members on the 5 principles we provided to you on page 5 and Question 4, then summarise your answer on where the SOLID principles have been violated in the application in Question 4 based on your understanding.
E3: Please go to Module 1 on canvas and open the code scaffold zip folder. There are 4 classes (ignore interfaces for now) in main > java > stickman > view folder, which have been read by you during week 1. Just based on your understanding, please specify what is the functionality of each method in these classes in your report. For example, there are two methods in class BlockedBackground including draw and update. What does it draw/What does it update?
What are you expected to submit?
You need to submit only one pdf file containing all your answers to the above 3 sub-exercises (E1, E2 and E3).
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 make a decent effort at the exercises AND You complete ALL questions.
Exercise
Criteria
Ratings
Pts
Description of criterion
1.0 pts Full Marks
a solid attempt at all required questions has been made
0.5 pts Half Marks
an attempt at some required questions has been made, or there are major flaws in the answer
0.0 pts No Marks
a poor or minimal attempt has been made
1.0 pts
Total Points: 1.0