Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 720 Bytes

README.MD

File metadata and controls

18 lines (13 loc) · 720 Bytes

Builder Pattern

How a composite object gets created.

Who does not like happy meal? Think of when you order one at the mcdonalds nearby. In this example project the happy meal product is made by using builder pattern. Inside happy meal product class there is a forward declaration to the builder.

Builder pattern separates the construction of a complex object from its representation. This way, using one builder we can create different happy meal products.

Note that in this example we don't use any concrete builder. Every part is done manually in the main.cxx.

Credits:

The logging library: plog

https://github.com/SergiusTheBest/plog

Read also:

https://refactoring.guru/design-patterns/builder