Builder Pattern
Builder Pattern
The Builder pattern’s intent is to separate the construction of a complex object from its representation so that the same construction process can create different objects. The Builder pattern is useful when several kinds of complex objects with similar rules for assembly need to be joined at run time but result in different object types. It achieves this by separating the process of building the object from the object itself.
The Builder pattern creates complex objects in multiple steps instead of in a single step, as in other patterns.