File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes OO, Patterns, UML and Refactoring and the fly likes question on class diagram Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "question on class diagram" Watch "question on class diagram" New topic

question on class diagram

deepak adlakha
Ranch Hand

Joined: Jul 27, 2001
Posts: 325

I am new to UML and need small suggestion. I am working on small project and my class diagram got some complex relationships. I am using RSA(IBM product) for UML diagrams.

I am stuck at one place, i tired very hard not to show any relationship with cross over lines, here i mean one line cover over another line in relationship between classes, as i find there are few common classes used in most of all classes.

So in my question is will that be ok in class diagram showing relationship with cross over lines..I tired showing in the example. Imagine i dont have any option besides crossing association, So i just wanted to check, is it ok or it is aganist UML diagrams.

I already spent couple of hours to rearrange classes, but everytime one/two classes i need to cross lines.

In total of approx 28 classes, only 2 or 3 are like this.

Looking for expert opinion on this.

[Thumbnail for image001.gif]

Jan Cumps

Joined: Dec 20, 2006
Posts: 2565

It is ok if it can't be avoided.
Here are some styling tips from IBM.
Image 5 ( shows crossing lines.

Still, the diagram is clear and clean.

OCUP UML fundamental and ITIL foundation
Vlad Varnica
Ranch Hand

Joined: Dec 28, 2002
Posts: 40
Line crossing can't be avoided.
btw, You could try to customize the link by adding a color or changing link thickness in order to make a differentiation between crossing lines.
It could help to add more specific information inside the diagram.
deepak adlakha
Ranch Hand

Joined: Jul 27, 2001
Posts: 325
Thanks it helps. I read the IBM link too.

But quick question, how do i draw this line-hop in class diagram. I dont see any option like that to do the same. Is there is any trick or special way of doing it ?
I agree. Here's the link:
subject: question on class diagram
It's not a secret anymore!