Abstract Factory


Usage

  • Also known as: Kit
  • Create an instance of several families of classes
  • Provide an interface for creating families of related or dependent objects without specifying their concrete classes

Diagram

Abstract Factory

Participants

AbstractFactory
  • Declares an interface for operations that create abstract products
ConcreteFactory
  • Implements the operations to create concrete product objects
AbstractProduct
  • Declares an interface for a type of product object
Product
  • Defines a product object to be created by the corresponding concrete factory
  • Implements the AbstractProduct interface
Client
  • Uses interfaces declared by AbstractFactory and AbstractProduct classes

Resources URL: 
notes/design_patterns/resources
Sources URL: 
notes/design_patterns/sources

See Also