Explorar o código

Merge branch 'grtfou-master'

Sakis Kasampalis %!s(int64=11) %!d(string=hai) anos
pai
achega
6c6530318e
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      abstract_factory.py

+ 6 - 0
abstract_factory.py

@@ -52,12 +52,18 @@ class DogFactory:
     def get_pet(self):
         return Dog()
 
+    def get_food(self):
+        return "dog food"
+
 
 class CatFactory:
 
     def get_pet(self):
         return Cat()
 
+    def get_food(self):
+        return "cat food"
+
 # Create the proper family
 def get_factory():
     """Let's be dynamic!"""