Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Represent a 1 to many relationship in UML

I'm building an application that allows the user to create a Human model (graphical model). Basically I'm trying to form a relationship in my UML diagram as follows:

A Human HAS many Body Parts > Legs, Arms, head etc ARE(is a) body part(s).

How can I represent the Human has many body parts in the visual studio 2010 UML class designer?

like image 966
Ari Avatar asked Nov 05 '11 01:11

Ari


1 Answers

I don't use VS but a literal rendition of your model would look something like this: enter image description here

You may consider representing the Human-Body Part relationship as Composition: enter image description here

A caution though: while the diagram models your example I would be wary of using it: I'd want to ensure there was a valid reason for creating the subtypes of Body Part. I.e. they have properties and/or behaviour that extends Body Part. Otherwise there's no need for the subtypes.

like image 112
sfinnie Avatar answered Oct 24 '22 20:10

sfinnie