You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# HeadFirstDesignPatterns_python
2
2
3
-
<imgsrc="images\learning.oreilly.jpg"alt="Girl in a jacket"width="200"align="right">Example code from [Head First Design Patterns second edition](https://www.wickedlysmart.com/head-first-design-patterns/) translated to python to help me understand and memorise the patterns.
3
+
<imgsrc="images\learning.oreilly.jpg"alt="Head First Design Patterns Second Edition"width="200"align="right">Example code from [Head First Design Patterns second edition](https://www.wickedlysmart.com/head-first-design-patterns/) translated to python to help me understand and memorise the patterns.
4
4
5
5
I am aiming for a literal translation without trying to make the code pythonic beyond, e.g. using python conventions for `ClassNames` and `method_names` and putting all of the code in a single file where it makes sense to do so.
**Simple Factory**: A class which chooses which product class to instantiate and return, based upon method parameters.
4
+
5
+
**Factory Method**: Define an interface for creating an object, but let subclasses decide which class to instantiate. The Factory method lets a class defer instantiation it uses to subclasses.
6
+
7
+
**Abstract Factory**: Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
0 commit comments