Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
提供一个接口,用于创建相关或者依赖对象的家族,而不需要指定具体的实现类。
The classes and objects participating in this pattern are:
- declares an interface for operations that create abstract products
- implements the operations to create concrete product objects
- declares an interface for a type of product object
- defines a product object to be created by the corresponding concrete factory
- implements the AbstractProduct interface
- uses interfaces declared by AbstractFactory and AbstractProduct classes