Question : Which are the ways in which a client can get a reference to an existing entity object's local component interface ?
Answer B. Receive the reference as a parameter in a method call.
Can someone please justify this answer
posted 9 years ago
There has to be a point - SOMEWHERE - in the flow of control for information to be passed from on part of the program to another. This is where abstracting away the fundamental operation of the machine shows a weakness as a design paradigm.
Although one could design a language such that a declaration of a reference to an object was made useable by that declaration, Java has historical origins such that auto-vivification of variables compartmentalizes to the area where the variable is declared.
To access that variable from another area of the program, you have to ask for it.
That would be called a getter method.
"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."