Lecture overview -- Keyboard shortcut: 'u'  Previous page: Patterns and Techniques [Section] -- Keyboard shortcut: 'p'  Next page: A Composite Example: Music Elements -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 20 : 37
Object-oriented Programming in C#
Abstract classes, Interfaces, and Patterns
The Composite design pattern

 

A Composite design pattern composes objects into tree structures.

Clients operate uniformly on leaves and composite nodes

A template of the class structure in the Composite design pattern.

The tree structure may be non-mutable and built via constructors

Alternatively, the tree structure may be mutable, and built via Add and Remove operations