Commit f434c0d
authored
Creational Pattern (1)
Why i did it?
I had to create a creational pattern and in this case i found the Factory method to be the one. where i created an interface for creating objects in a super class, but allowing subclasses to alter the type of objects that will be created.
How i did it?
I created a new interface class in #init for location to implement creational pattern and the interface for location class is missing so i just added an interface class and serialized the location into a dict.1 parent c3d8c6e commit f434c0d
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
0 commit comments