$> git checkout composite
Intent
Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.1
Applications
A lot of things in life have a hierarchical structure : family trees, relationships, organizations, language, nature, military, government, addresses, workplace, games, file structure, and much more. Sometimes things are easier to think about in hierarchies. Imagine trying to try explain your family tree using only first names. Hierarchies allow us to take a complex system and break it down into related ...