I read somewhere that:
(1) associations in UML class diagrams are mapped directly into the instance variables in the classes involved.
(2) multiplicity of the association is manifested by a Collection
(3) direction of the association is manifested by one class having an instance variable of type of the other class, but not vise versa.
(4) use/depend relationship is translated into "import" statement.
But when I read
pattern books, the above mappings are not adhere to at all, I can not see the connection between the class diagram and the
Java class code. Could it because:
(1) The above mappings are not RULES that need to adhere to.
(2) People some times are too lazy to make the mapping EXPLICIT for a novice like me to see.
(3) Something wrong with me.
Help please, thank you