-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,33 @@ | ||
# Lab 14 - Design Pattern Review | ||
|
||
In this recitation, you will revisit three crucial design patterns: **Strategy**, **Template**, and **Decorator**. For each pattern, your task is to articulate key aspects, discuss scenarios where it is beneficial, highlight situations where it might not be the best choice, and demonstrate their use in UML diagram in the context of *Santorini's God Cards*. | ||
|
||
|
||
## Deliverables | ||
- [ ] Fill out the **Strategy** pattern template and answer follow-up questions of the TA | ||
- [ ] Fill out the **Template** pattern template and answer follow-up questions of the TA | ||
- [ ] Fill out the **Decorator** pattern template and answer follow-up questions of the TA | ||
|
||
## Introduction | ||
Throughout the semester, we've delved into many commonly used design patterns, including **Strategy**, **Template**, **Decorator**, **Composite**, **Observer**, **Proxy**, and **Adapter**. | ||
|
||
In this lab, we will focus on the first three. | ||
|
||
For each design pattern, you are expected to provide information in four sections: | ||
|
||
- **Description**: Define the key characteristics that distinguish the pattern from others. | ||
- **Pros**: Explain when and why you would choose this pattern. Focus on its advantages in terms of design principles and coding styles. | ||
- **Cons**: Identify scenarios where choosing this pattern might be suboptimal. Focus on what makes it less preferable compared to alternative choices. | ||
- **UML Diagram/Code snippet**: Draw an excerpt of a UML object model illustrating how you could use the design pattern to implement God Cards in Santorini. The model should show concrete classes that are plausible in the game, but an excerpt with only a small subset of methods or fields is fine, as long as it demonstrates the pattern. | ||
|
||
|
||
## Instructions | ||
|
||
### Download the cheatsheat | ||
|
||
1. Create a copy of the template at https://docs.google.com/document/d/1o-j6jTDt1VLfUzJaF_kp-3blUSpXp-U7BGSPdN4vt08/edit?usp=sharing | ||
|
||
### Tips | ||
|
||
- Strive to devise your explanations before consulting external sources. | ||
- While you are only required to explain three design patterns to the TA, feel free to continue filling in the information for the remaining patterns and seek clarification or assistance from the TA if needed. |