Structural design patterns focus on how objects and classes are combined to form a system. There are two categories of structural design patterns:
- Object design patterns: Structural object design patterns are used to describe how to create objects with new functionality
- Class design patterns: Structural class design patterns utilize inheritance to create interfaces and combine multiple classes to form a larger structure
Examples of both the approaches are provided in this chapter.
The seven structural design patterns presented in this chapter all have an object scope, with the exception of the adapter design pattern. The adapter design pattern has both object and class scope, as illustrated in the following table:
Object scope | Class scope |
Adapter object pattern | Adapter class pattern |
Bridge pattern | |
Composite pattern | |
Decorator... |