Structural Patterns - Composite
Melbourne Patterns Group July 1 2009Chris Bushell
Intent
Allow clients to treat primitive objects and containers in the same way
Graphics Example
• Line
• Rectangle
• Text
etc.
Graphics Example Continued
GraphicLineRectanglePicture
LineRectangle
Recursive Composition
Puzzle Example
Participants
• Component
• Leaf
• Composite
Participants
Code