Abstract Factory Pattern - main players



  • AbstractFactory
    • An interface with Create operations for each of the abstract products
  • Factory1, Factory2
    • Implementations of all the AbstractFactory creation operations
  • AbstractProduct
    • An interface for a kind of product with its own operations
  • ProductA1, ProductA2, ProductB1, ProductB2
    • Classes that implement the AbstractProduct interface and define product objects to be created by the corresponding factories
  • Client
    • A class that accesses only the AbstractFactory and AbstractProduct interfaces