R
Richard Molyneux
Hey,
I have a question which has been nagging me for quite some time, regarding
OO programming (in particular Java). I've written code which passes the
instance of a class (called A) as a parameter in the creation of an instance
of (another) class (called B). The instance of class A maintains a long term
state of the program, while the instances of B merely provide updates to the
state of A.
Basically, I'm wondering if the use of such practices is wise in regard to
OO (despite being technically allowed within Java)?
Thanks,
Richard.
I have a question which has been nagging me for quite some time, regarding
OO programming (in particular Java). I've written code which passes the
instance of a class (called A) as a parameter in the creation of an instance
of (another) class (called B). The instance of class A maintains a long term
state of the program, while the instances of B merely provide updates to the
state of A.
Basically, I'm wondering if the use of such practices is wise in regard to
OO (despite being technically allowed within Java)?
Thanks,
Richard.