Which pattern prescribes recursive composition for complex objects?
-
Composite Pattern
-
Strategy Pattern
-
Observer Pattern
-
Factory Pattern
A
Correct answer
Explanation
The Composite pattern composes objects into tree structures to represent part-whole hierarchies. It allows clients to treat individual objects and compositions of objects uniformly through recursive composition, enabling complex objects to be built from simpler ones using the same interface.