jeudi 9 janvier 2020

does the Constructor of an Observer needs the Observable as parameter?

I am trying to implement an Observer to my anime GUI.

So if an Anime episode is released, then notify the other Observer to update the state of the episode of this specific anime.

And it works.

My Question:

I am trying to understand Observer Pattern and i would like to know if i have to give the Constructor of an Observer the Observable as parameter.

Because i have seen it in some Tutorial and Sites, therefor i am a bit confused.

Best regards

Your George

Aucun commentaire:

Enregistrer un commentaire