Closed DanRechtman closed 2 years ago
I applied the observer pattern to the getLocationByCountry method.
getLocationByCountry
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 ConcreteCovidGetLocation for the subject and ConcreteObserver for the observer.
ConcreteCovidGetLocation
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
getLocationByCountry
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
ConcreteCovidGetLocation
for the subject andConcreteObserver
for the observer.To look for an example of how this work look at
test.py