Introduction to OOP Chapter 24: Design Patterns : next previous audio real text


Problem: Allow the client the choice of many alternatives, but each is complex, and you don't want to include code for all.

Solution: Make many implementations of the same interface, and allow the client to select one and give it back to you.

Example: The layout managers in the AWT. Several different layout managers are implemented, and the designer selects and creates one.

Gives the designer flexibility, keeps the code size down.

Intro OOP, Chapter 24, Slide 10