Worksheet 7

COMP140 - Worksheet 7

Data Structures States & Transitions

7. Design Patterns

Note - Please don’t start the exercises below until the begining of mondays workshop as the task will be done in groups and may change in the run up to the session.

You will be assigned a specific pattern in pairs in todays session. Once you have a pattern to research.

EXERCISE

Research and Implement a design pattern in code

  1. Define its key elements and research how it is implemented
  2. Fork this repo and add a folder referring to pattern you are researching. I have put an example repo of the Observer pattern that contains a unity project and a readme as an indicative approach.
  3. In your repo use the readme.md to explains the patterns key features.
    1. Define the purpose and use case of the pattern
    2. Explain its principle classes, interfaces and implementations
  4. Using the design pattern you researched, implement an example that uses Unity or a VS Console app and changes or alters game objects in some way.
  5. Demonstrate your approach with well structured and commented code.
  6. Be prepared to explain how this solves a key problem.
  7. You can make use of existing code samples but please demonstrate how you customised the example to meet your own needs.

Rest of the Week

  1. Complete the above exercise.
  2. Demonstrate a design pattern/s in your own Individual project if this gives you a problem that the pattern may solve.
  3. For reference the highest grade in the rubric is awarded to projects that exhibit:
    Significant insight into the software architecture. There is significant evidence of software design. There is synergy between data structure and design pattern selection. The selection of data structures and design patterns are well justified.

LECTURE

It is assumed that you have watched the video lecture and viewed the materials before this workshop. If not you should find time to watch them during the week.