The Composite design pattern solves
problems like:
How can a part-whole hierarchy be represented
so that clients can treat individual objects
and compositions of objects uniformly?
See Applicability section for all problems Composite can solve.
See Solution section for how Composite solves the problems.
Part objects
and (2) Whole objects
that act as containers for Part
objects.
Part
and Whole objects differently,
which makes them
more complex especially if
the object structure is
constructed and traversed dynamically.