0

What if you have two classes and there are more than one type of lines that can be drawn between them, for instance there might be an association relationship as well as an aggregation between the two classes.

Can I show multiple of these relationships between two classes that I've modelled on a class diagram?

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by asif49
0

What are you using for your UML modeling tool? In any case, most such tools with which I am familiar (most of them) will let you make multiple connections between two classes. After all, that is not a totally unknown requirement, such as modeling a binary tree, where you have a node, and connections to a left and a right node of the same class. So, in that case you have multiple connections from one class to itself. That is another, more extreme, form of this problem. So, if your modelling tool does not allow such, ditch it for one that does!

I just tested this out using my modeling tool - Sparx Systems' Enterprise Architect - which I have been using for major systems development for 6 years now, and it handles it without problems.

So, even if you are manually drawing such models using some sort of drawing tool, you can do this.

0

Actually, I'm doing some research for an exam for which I'll probably have to model a class based on some descriptions of software requirements.

I've always been curious whenever I see some UML class diagrams they do not usually have more than one connection between the same two classes and I'm just wondering whether that means you can't have them. From the softwares I've worked on - it would make logical sense for there to be multiple connections but I don't want to get marked down so I might just leave it

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.