samedi 8 juin 2019

In builder pattern, is method `buildpart()` factory methods?

In builder design pattern,

enter image description here

is method buildpart() a factory method?

Why are they (not) factory methods? For clarification, could you also provide the definition of a factory method?

An example for buildpart() from Design Patterns by Gamma et al is:

void StandardMazeBuilder::BuildMaze  () {
_currentMaze  = new Maze;
}

Thanks.

Aucun commentaire:

Enregistrer un commentaire