问题
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