Forums Register Login

Class update dependency

+Pie Number of slices to send: Send
my program classA, and this class needs to be aware and update itself whenever classB changes state, what’s the best way to implement this?
+Pie Number of slices to send: Send
Consider making class B an Observable, and class A an Observer.
+Pie Number of slices to send: Send
Wikipedia has a nice entry on the Observer pattern which includes a Java code example as well.
I was born with webbed fish toes. This tiny ad is my only friend:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 521 times.
Similar Threads
Hibernate update method
Creating an Update App
Is Fowarder-receiver promiscuous?
JSP & JavaBeans
How Multiple Inheritance can be achieved in Java ?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 03:55:53.