Skip to content

Commit bcabfc3

Browse files
committed
Folder + readme for Chapter 4 : Factory
1 parent 11f098b commit bcabfc3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# HeadFirstDesignPatterns_python
22

3-
<img src="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+
<img src="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.
44

55
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.
66

chapter04_factory/readme.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Chapter 4: Factory patterns
2+
3+
**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

Comments
 (0)