The intent of a composite is to "compose" objects into tree structures to represent part-whole hierarchies.
This makes client classes easier to implement, change, test, and reuse.
When dealing with Tree-structured data, programmers often have to discriminate between a leaf-node and a branch.
The operations you can perform on all the composite objects often have a least common denominator relationship.
Instead, the Client refers to the common Component interface and can treat Leaf and Composite uniformly.
The Leaf class has no children and implements the Component interface directly.