Pattern COMPOSITE
Solution
- Define a class that is an abstraction for the primitive objects
- Both primitive and composite classes inherit from that class
- A composite object contains a collection of primitives
- An operation on a composite class is applied to its primitives,
results are combined
prev
|top
|next