Closed DanRechtman closed 3 years ago
I applied the observer pattern to the getLatest method.
getLatest
Applying it is pretty straightforward. All I made an IObserver interface for the observers and a subject interface for the subject.
IObserver interface
subject
Then I implemented those interfaces in ConcreteCovidGetLatest for the subject and ConcreteObserver for the observer.
ConcreteCovidGetLatest
ConcreteObserver
To look for an example of how this work look at test.py
test.py
I applied the Observer pattern
I applied the observer pattern to the
getLatest
method.How
Applying it is pretty straightforward. All I made an
IObserver interface
for the observers and asubject
interface for the subject.Then I implemented those interfaces in
ConcreteCovidGetLatest
for the subject andConcreteObserver
for the observer.To look for an example of how this work look at
test.py