|
@@ -23,9 +23,9 @@ class PetShop:
|
|
|
abstract factory"""
|
|
|
|
|
|
pet = self.pet_factory.get_pet()
|
|
|
- print("This is a lovely {}".format(pet))
|
|
|
+ print("We have a lovely {}".format(pet))
|
|
|
print("It says {}".format(pet.speak()))
|
|
|
- print("It eats {}".format(self.pet_factory.get_food()))
|
|
|
+ print("We also have {}".format(self.pet_factory.get_food()))
|
|
|
|
|
|
|
|
|
# Stuff that our factory makes
|
|
@@ -83,15 +83,15 @@ if __name__ == "__main__":
|
|
|
print("=" * 20)
|
|
|
|
|
|
### OUTPUT ###
|
|
|
-# This is a lovely Dog
|
|
|
+# We have a lovely Dog
|
|
|
# It says woof
|
|
|
-# It eats dog food
|
|
|
+# We also have dog food
|
|
|
# ====================
|
|
|
-# This is a lovely Cat
|
|
|
-# It says meow
|
|
|
-# It eats cat food
|
|
|
+# We have a lovely Dog
|
|
|
+# It says woof
|
|
|
+# We also have dog food
|
|
|
# ====================
|
|
|
-# This is a lovely Dog
|
|
|
+# We have a lovely Dog
|
|
|
# It says woof
|
|
|
-# It eats dog food
|
|
|
+# We also have dog food
|
|
|
# ====================
|