One of the Gang of Four design patterns is called Bridge. The summary of the pattern states that it decouples an abstraction from its implementation so that the two can vary independently. What does that mean? You can usually separate an object into two parts. There's the core part that knows about the implementation of the object and the structure of the data. On top of this there's the abstraction that just calls the implementation but provides higher level facilities. The bridge pattern suggests that you separate the implementation into a separate object and refer to it in the original only by a handle. This allows you to provide different implementations using delagation rather than inheritance.
The strange thing about the Bridge pattern is that it's often difficult to recognize the pattern in hindsight. Once you've applied the Bridge pattern, the resulting design often appears as just a straightforward object model with good delegation of responsibility.
Download