May 2022
Intermediate to advanced
678 pages
11h 48m
English
This chapter covers the Composite pattern.
It composes objects into tree structures to represent part-whole hierarchies. The Composite pattern lets clients treat individual objects and compositions of objects uniformly.
Consider a shop that sells different kinds of dried fruit such as cashews, dates, and walnuts. Each item has a certain price. Let’s assume that you can purchase individual items or you can purchase gift packs (or boxed items) which are composed of different dried fruit items. In this ...
Read now
Unlock full access