> Design Patterns > Composite Design Pattern
Composite design pattern is used to handle primitive and composite objects uniformly.
The intent of composite design pattern is to compose the object to present part-whole hierarchy and handle both primitive and composite object uniformly.
That means both the primitive and composite object have to be handled in similar manner.
Here is the composite design pattern example.
There is Monitoring System to monitor applications and resources. These applications uses resources like system, database etc. Same resources and some other resources are available and used for other purpose. Compose application and resources objects into tree structures to represent part-whole hierarchies. Treat individual objects and compositions of objects uniformly.
|C++||Composite Pattern in C++||Composite Pattern C++ Example|
|C#||Composite Pattern in C#||Composite Pattern C# Example|
|Java||Composite Pattern in Java||Composite Pattern Java Example|
|Python||Composite Pattern in Python||Composite Pattern Python Example|
|PHP||Composite Pattern in PHP||Composite Pattern PHP Example|
|Ruby||Composite Pattern in Ruby||Composite Pattern Ruby Example|
|Swift||Composite Pattern in Swift||Composite Pattern Swift Example|
|Objective-C||Composite Pattern in Objective-C||Composite Pattern Objective-C Example|