In SCEA FOR J2EE (PAUL ALLEN AND JOSEPH BAMBARA) , I found the following question
In a class diagram, what does a line with an arrow from one class to another denote ?
A. Attribute visibility B. Class visibility C. Method visibility D. Global visibility
Answer is A.
But my understanding is when we join a class to other class with a line, that means Class visibility. Also Attribute and Method visibility should be based on the access specifiers (private, public..etc).
Please let me know if this understanding is not correct
Sending messages requires visibility : a reference or pointer to the receiving object �For an object A to send a message to an object B, B must be visible to A.�
Ways in which A can have visibility into B: Attribute Visibility: B is an attribute of A Parameter Visibility: is a parameter of a method of A Local Visibility: B is a (non-parameter) local object in a method of A Global visibility: B is in some way globally visible
so if B is associated to A, there is obviously attribute visibility. Not intuitive.
The line with an arrow depicts association relationship. Association represents the attributes that are not simple (String, Integer, etc) and are Complex Objects. During implementation these associated objects will be captured as attributes inside the Class from where the arrow starts.