Bridge Design Pattern
/This entry is part of a series on programming Design Patterns that provides a framework for the rapid recall and use of patterns during application design.
The Bridge design pattern is used to define multiple processes that work on multiple object types with similar aspects.
To understand how this pattern might be used, consider how software to control a real bridge might be constructed. Such an application would have two processes: trafficControl() and gateControl() which would control two types of objects: cars and boats.
class Bridge - contains methods to control bridge activities.
trafficControl(trafficType) - method that controls traffic signals.
gateControl(trafficType) - method that controls the bridge gates.
class Traffic - contains objects describing types of traffic.
cars() - defines car objects
boats() - defines boat objects