1/13
Flashcards covering key vocabulary and concepts from the Composite Pattern lecture.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Composite Pattern
A design pattern that allows treating individual objects and compositions of objects uniformly.
ComponentNode
The abstract base class for composable expression tree node objects.
LeafNode
A node that does not have any children in the expression tree.
UnaryNode
A node that has exactly one child in the expression tree.
BinaryNode
A node that has exactly two children in the expression tree.
Visitor pattern
A design pattern that allows adding new operations to a class hierarchy without modifying the classes.
Recursion in Tree Structures
The structural property where a composite structure is defined in terms of itself.
Intent of Composite Pattern
To treat individual objects and recursively-composed objects uniformly.
Extensibility
The ability to add new components to the structure without altering existing formats.
Uniformity
The principle of handling components the same way regardless of their complexity.
Overhead in Composite Pattern
The potential performance cost incurred by increased numbers of composed objects.
Expression Tree
A tree structure used to represent expressions where each node corresponds to an operation or operand.
Hierarchy of Nodes
An organized structure that captures the relationships and properties of different node types.
Applicability of Composite Pattern
Use when objects must be composed recursively with no distinction between individual and composite elements.