> Design Patterns > Composite > Composite Design Pattern In Objective C

Composite Design Pattern In Objective C

Composite design pattern in Objective C to handle primitive and composite objects uniformly.


Composite design pattern In Objective C

Output

Composite::Operation
Leaf::Operation
Value = Leaf A
Leaf::Operation
Value = Leaf B
Composite::Operation
Leaf::Operation
Value = Leaf XA
Leaf::Operation
Value = Leaf XB
Leaf::Operation
Value = Leaf C


Suresh Kumar Srivastava is founder of online learning site coursegalaxy.com and author of popular books C In Depth, Data Structures Through C In Depth. He has 18+ years experience in industry and worked on architecture and design of multiple products. This article Composite Design Pattern In Objective C is from his Design Patterns course.