aspose file tools*
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
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
Author

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)

~g1
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

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
 
wood burning stoves
 
subject: To use or not to use Association Class