Composite Pattern

The Composite Pattern is a structural design pattern that enables you to compose objects into tree structures to represent part-whole hierarchies. This pattern simplifies the management of complex object structures by allowing clients to treat individual objects and compositions of objects uniformly. It is particularly useful for scenarios involving recursive or hierarchical data.