UML sequence Diagram duplicate methods

浪尽此生 提交于 2019-12-25 09:55:56

问题


There can be 2 operations that retailer can make when he is updating inventory i.e. update existing record or add a new one. so after making those two operations the controller will invoke updateView() Method to change the main page view. All together i have used it thrice so is it ok to call a same method? I have added the image for the reference.


回答1:


No. That's not ok. First: The Retailer will not directly call methods of the UIController. He will always use the View (Main Page). These interaction are then further handled by the UIController. You shall not shortcut calls through any instance.

Now, when you click save in the main page in your example, those are likely different saves. There are two ways to get around this: One is to have more than a single View (Main Page A, Main Page B, etc. or be more specific in what is displayed). Second is to name the clicked buttons correctly. That would then be Save A, Save B, etc.



来源:https://stackoverflow.com/questions/38230088/uml-sequence-diagram-duplicate-methods

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!