How To Represent The Call To A Class Through Another Class Using An Uml Class Diagram
Solution 1:
Yes, you are mixing processes and structures. Class diagram is a structure diagram, no processes are shown here, mere dependencies. You can use dependency <i> for instantiating, but this only means that one class needs the other and what for. Yes, it is a bit about processes, but MAINLY class diagram is about structures.
Cooperation of Android components (Activities, Services, etc.) should be shown by Component diagram, not class diagram. There you can draw, what messages are sent, who call whom and so on. Class diagram are for more thorough analysis. You can use some classes in component diagram, too. But don't forget to show, to which component the class belongs, as you have forgotten to do here. Use nesting/containment relationship for this.
And on arrows from Activities you use the word "click". Aren't you trying to describe the UI here? That is for one more diagram. There is NO standard diagram for UI planning, but I could advice the use of class diagram elements for it. But it is NOT a class diagram, it is UI diagram, that uses class diagram elements.
As for class diagram:
You can draw dependencies from activities to Service. Such info, as who starts, who stops and so on, could be also on notes in class diagram, or, if it is not absolutely necessary, move it to Activity diagram.
On the association HelperClass - ClassService the multiplication on the target side should be 0..1. Service is not ALWAYS there, is it?
Launcher is a bad stereotype. Better give the name Launcher to the class and if you think it doesn't explain the situation, anchor a note to it.
Relationships of activities classes are not defined.
So, it seems, you have tried to put 4 diagrams in one. It would never work. Divide them or at least, clean the one that you've chosen. And if you are choosing, what ONE diagram to do, choose Component one - it is the most common and will be the most useful.
Edit: How to show that a class is included in a component - 2 ways. You can include class into component and you can connect them by nesting relationship. Both ways are equivalent in the content sense.
Solution 2:
Draw class diagram with operation definitions. And sequence diagram where you can define communication between lifelines of two classes. Put thirt lifeline for mediator and draw messages. This way you can described that two instances communicate through mediator.
Post a Comment for "How To Represent The Call To A Class Through Another Class Using An Uml Class Diagram"