Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

To use or not to use Association Class

 
Jeevan Sunkersett
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic