Design patterns – Builder

The builder is a class which its sole purpose is to create and initialize an object instance of some type. Builder is usually linked with the composite pattern.

The intent of the Builder design pattern is to separate the construction of a complex object from its representation.

Usually, the builder functions return a pointer/reference to itself, in order to chain the calls.

The full code can be found at the following link:

You may also like...

Leave a Reply