-
Notifications
You must be signed in to change notification settings - Fork 0
/
observer.py
21 lines (19 loc) · 858 Bytes
/
observer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import abc
class zooAnnouncer(abc.ABC):
@abc.abstractmethod
def update(self):
pass
class concreteZooAnnouncer(zooAnnouncer):
def __init__(self, arg):
self.arg = arg
def update(self, arg) -> None:
if arg == "wakeup":
print("Hi this is the {}, zookeeper is about to wake the animals".format(self.arg))
elif arg == "rollcall":
print("Hi this is the {}, zookeeper is about to roll call the animals".format(self.arg))
elif arg == "feed":
print("Hi this is the {}, zookeeper is about to feed the animals".format(self.arg))
elif arg == "exercise":
print("Hi this is the {}, zookeeper is about to exercise the animals".format(self.arg))
else:
print("Hi this is the {}, zookeeper is about to shut down the animals".format(self.arg))