Преглед на файлове

Merge branch 'grtfou-master'

Sakis Kasampalis преди 11 години
родител
ревизия
6c6530318e
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6 0
      abstract_factory.py

+ 6 - 0
abstract_factory.py

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