Abstract Factory, Builder, and Prototype Design Patterns
I. Abstract Factory Pattern:
Abstract Factory Pattern: Factories and products are the key participants in the Abstract Factory pattern. This pattern captures how to create families of related product objects without instantiating classes directly. It is most appropriate when the number and general kinds of product objects stay constant, and there are differences in specific product families. We choose between families by instantiating a particular concrete factory and using it consistently to create products thereafter. We can also swap entire families of products by replacing the concrete factory with an instance of a different one. The Abstract Factory pattern's emphasis on families of products distinguishes it from other creational patterns, which involve only one kind of product object.
II. Builder Pattern
Builder: Separate the construction of a complex object from its representation so that the same construction process can create different representations.