Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

SOFT2201/COMP9201

Week 9 Tutorial

Revisit and Open Discussion 1

This tutorial is mainly focusing on revisiting some tutorial questions you have done for design pat- terns, and open discussions on design principles, weekly exercises and assignment 1. It is also a good chance for you to communicate with your tutors if you have any questions.

Question 1: Open Discussion on SOLID and GRASP

You are going to be allocated into a group by your tutor on Ed workspace.  Each group will be assigned at least one principle from SOLID and GRASP. Have a discussion with your group members and complete the following tasks:

Task 1: Set up group folder and files on Ed workspace

– Go to the corresponding Ed workspace following your tutor’s instruction

– One group member creates a folder with the name of "member1_member2"

– Other group members find and join the folder created by your group member

Task 2: Explain the given principle in the "readme.txt" file based on your group’s understanding.

• Task 3: Give an example in your folder (either code example in the java file or UML example by uploading image file in your folder, however the example must not be the same as weekly exercise 4) that violates the principle.  Explain in the "readme.txt" file the reason why the

violation on this principle happens and how to solve the violation in your example.

Task 4: Demonstrate your example to your class for further discussion guided by your tutor.

Question 2: Revisit the Factory Method Exercise on Week 5

Factory Method specifies construction of multiple related objects under a single method, the object can decide what object to create and how to create it and return to the caller. The object created is utilised through a common type that all objects created from the factory method type share.

In week 5 tutorial, you have refactored the design in Question 3 to utilise Factory Method pattern. Please model your codebase in a UML class diagram and identify the Factory Method participants on the UML.

Question 3: Revisit the Strategy Exercise on Week 6

One thing to note is that behavioural patterns encapsulate information required to act in different ways.  For strategy pattern, selecting an algorithm (or method) based on run-time instructions, this information is commonly encoded within the invoking method.

In week 6 tutorial, you have refactored the design in Question 2 to utilise Strategy pattern.  Please model your codebase in a UML class diagram and identify the Strategy participants on the UML.

Question 4: Open Discussion on Weekly Exercises and Assignment

An open discussion on weekly exercises 5, 6, and assignment 1 will be held under the guide of your tutor in an interactive way.  Tutors are going to summarise their feedback and observations during their marking process of weekly exercises and assignment 1, and to address the common problems via discussions.