SOEN 344-4-Design Patterns
SOEN 344-4-Design Patterns
1
Design Patterns Catalog
2
5. Strategy
(Behavioral Pattern)
3
4
Using Strategy
5
6
Intent & Example
7
Excerpt of the Structure
8
General Structure
9
Strategy - An Alternative to Subclassing
10
Example - “The Strategy Pattern” in Java AWT/Swing
11
Things to Consider
12
Things to Consider
13
Things to Consider
14
Implementation
15
Implementation
16
Comparison of the Strategy Design Pattern
and the Template Design Pattern We will come back to this
slide later when we see
Template Pattern
17
6. Prototype
(Creational Pattern)
18
19
20
21
22
23
24
25
26
27
7. Adapter
(Structural Pattern)
28
29
30
31
32
33
34
35
36
37
38
Adapter
39
40
41
8. Composite
(Structural Pattern)
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Design Patterns Catalog
61