• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

class diagram question

 
Edward Farrow
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
say you have a class call Polygon and a class called Side. inside the box for Polygon, you see it has an attribute called sides which is an array of Side. there is also a box for Side with its attributes. Is it incorrect to have a solid arrow going from Polygon to Side with a 0..* label? I think you should pick either the attribute or the arrow, both is redundant.
 
Rufus BugleWeed
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm a little unclear about your question, but I'll take a stab.
Whether Side is an array of attributes in Polygon or Side is shown as a seperate class with an arrow and a multiplicity is up to the diagram author.
If Side is a simple class everybody understands from the title, attribute is fine.
If Side is complicated abstraction not clear to everybody then seperate class may be called for.
Some of this depends on how coarse or fine grained the drawing is intended to be.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic