0
Is this observer pattern implementation proper?
Hi Refer code below which I did for observer pattern demo: https://www.sololearn.com/compiler-playground/cDOXVq3r9ItO Feel free to share your views on same. Any improvement advice is most welcome. Also I have two doubts as below : My notification is not generic. Right? Notify expects string message as an argument. Isn't it a tightly coupled code? How to avoid this and come up with better design? I feel that current observer is restricted to notify string message and curious to know generic solution. https://code.sololearn.com/cDOXVq3r9ItO/?ref=app
1 Antwort
0
correct command gives correct result