What is Composite?
Treats single items and groups the same way. Tree structures where leaves and folders share one interface.

size() · files and folders alike
Composite lets clients treat…
Write it in your own words in the app.
In real work
Composite: FileNode treats files and folders the same way, so both support size() in the backup report.
In the illustration
A probe asks the top folder for its size; each folder dial adds its children's dials, leaves first, and the total climbs up the tree to the top dial.
Model the folder tree in your coding agent as a composite: files and folders share one Node interface, and size() works the same on a leaf and on a tree.
Try it now
The fastest way to learn a word is to use it. Open this line in the agent you already work in and watch what it does. Change the tool to the one you use.
Go further
01Practice
Make it stick
One term a day, a short quiz, and sentence practice that checks your own words.
02Verify
Prove you know it
Pass the quiz and keep it in a Skills Wallet you can share with anyone who needs proof.
03Career
Find the work that uses it
See which roles lean on this vocabulary, and what they pay in year one.





