Hello people!
I am preparing for th SCJA exam. In fact, I am preparing all our team.
I have some questions about this exam objective:
"Develop code that implements simple class associations, code that implements multiplicity using arrays, and recognize code that implements compositions as opposed to simple associations, and code that correctly implements association navigation."
I know what association and composition are. I would implement multiplicity N using arrays (or List) following the JavaBeans conventions for indexed properties, described at
indexed property.
Would that be correct for the exam?
How do I recognize compositions as opposed to simple associations? Maybe I don't understand the question properly. I would implement them the same.
How do I correctly implement association navigation? I think with a JavaBean with an indexed property, the client can navigate to the associated other object. Is that correct for the exam?