To the forum,
In an exercise that I am working on, I am asked to pass an object from the originating class to a destination class, manipulate the data in the " originating class" and then return the results. I am able to pass the object to the destination class, but I am unable to manipulate the variables of the originating class, because they are private, which is a requirement.
My question is, is this possible to manipulate the variables in the originating class (they need to remain private)?
If I cannot manipulate the variables, is their a way that I can make a calculation on the destination class and somehow pass it back to an originating class method?
Can someone provide a simple example of an originating class passing off control to a destination class and then passing information back?