Composite
Problem:
- Complex part-whole hierarchy has lots of similar classes.
- Example: document, chapter, section, paragraph.
-
Forces
- • simplicity -- treat composition of parts like a part
- • power -- create new kind of part by composing existing ones
- • safety -- no special cases, treat everything the same