Is there another diagram better than class diagram?

i m currently develop a new system and is facing problems in drawing certain diagram to descript my classes.

i hope to show the relationship of each method inside a class have what relationship to different classes’s method. if i use class diagram, i only can show the relationship of WHICH class got relationship with WHICH class.

but if i change certain code inside one of the method, i dono which method in different class will be affected. this mean that i need to go through the code instead of my documentation…

hope somebody can help me, or give me any suggestion…

Or is it a good idea that i draw an UNSTANDARD diagram instead of class diagram in order to show my relationshiop

Dear chok,

In your situation, I suggest you can use the sequence diagram or the communication diagram. These kind of diagrams helps to showing the dynamic behavior of the system. In your case, it shows you which class(es) will be affected when a method of one class was being updated.

Best regards,
Rain

Class diagram describes static relationship. Sequence diagram is how classes interact.

However if you do business logic and need to analyse dynamics and turn them into classes, communications, transformations and responisbilities/contracts I would suggest activity diagrams. They also help to discover requirements of the system.

I would not quite agree that sequence diagrams show dynamic behavior of the system. They rather show how activity and class colaborations are to be implenented. There is slightly different perception of system dynamics and class collaboration.

I have recently wworked with activity diagrams after working with class and sequence diagrams and I find the approach much more appropriate rto analysis of requirement and transformation to implementation than use case diagrams that stand for pure definitions… yet they do not represent much of dynamics.