Composite: A tree structure of simple and composite objects. Compose
objects into tree structures to represent part-whole hierarchies.
Composite lets clients treat individual objects and compositions of
objects uniformly.
It can be use as recursive Tree structure. Such as file tree. A folder is
composite, and a file is component, and a folder can be a component
of another composite.
Client just communicate with abstract component, invoke it’s operation
function.
A leaf will not include any component.
Composite has a children component list. It has add(), remove() and
getChildren() three functions.
You can add component &parent, then It will point to parent