Design Patterns (GoF) (50 Qs)•Part 3: Architectural Patterns & Enterprise Systems (25 - 35)
What is the Composite Pattern and how does it treat trees of objects uniformly?
junior LevelFormsData Structures
In Simple Words:
The Composite Pattern organizes objects into tree structures to represent part-whole hierarchies. Clients treat individual leaf objects (e.g., File) and composite containers (e.g., Directory) through a single unified interface.