Chapter 11. The Abstract Factory Pattern

Overview

This chapter continues our study of patterns with the Abstract Factory pattern, which is used to create families of objects.

This chapter

•   Provides an example to help you derive the Abstract Factory pattern.

•   Presents the key features of the Abstract Factory pattern.

•   Relates the Abstract Factory pattern to the CAD/CAM problem.

Introducing the Abstract Factory Pattern

According to the Gang of Four, the intent of the Abstract Factory pattern is to “provide an interface for creating families of related or dependent objects without specifying their concrete classes.”1

Sometimes several objects need to be instantiated ...

Get Design Patterns Explained: A New Perspective on Object-Oriented Design, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.