Skip to content

Commit b8b500a

Browse files
EyalPetrarodavidgf
authored andcommitted
Update factory.md (davidgf#24)
Fix template link
1 parent 65f99d9 commit b8b500a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

factory.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
We need to create objects without having to specify the exact class of the object that will be created.
55

66
## Solution
7-
The **Factory** pattern is a specialization of the [Template](template.md) pattern. We start by creating a generic base class where we don't make the "which class" decision. Instead, whenever it needs to create a new object, it calls a method that is defined in a subclass. So, depending on the subclass we use (**factory**), we create objects of one class or another (**products**).
7+
The **Factory** pattern is a specialization of the [Template](template_method.md) pattern. We start by creating a generic base class where we don't make the "which class" decision. Instead, whenever it needs to create a new object, it calls a method that is defined in a subclass. So, depending on the subclass we use (**factory**), we create objects of one class or another (**products**).
88

99
## Example
1010
Imagine that you are asked to build a simulation of life in a pond that has plenty of ducks:

0 commit comments

Comments
 (0)