This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes To use or not to use Association Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "To use or not to use Association Class" Watch "To use or not to use Association Class" New topic

To use or not to use Association Class

Jeevan Sunkersett
Ranch Hand

Joined: Jul 03, 2007
Posts: 77
For part2 of the SCEA I am drawing the class diagram.

I am confused; when shud one use/ not-use an Association Class
when showing an asscociation between 2 classes.

Could some body provide a clear example (maybe code) to make it clear?

UML tools allow a line to be drawn between the classes
(with or without arrows; to indicate direction)
One end of the line can be diamond (filled for composition and unfilled for aggregations)

Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

I don't explicity define the association class, but imply it through the association link in the class diagram. The actual object type used for the code becomes an low-level implementation detail that I could care less about.

-Cameron McKenzie
I agree. Here's the link:
subject: To use or not to use Association Class