UML序列图重复方法 [英] UML sequence Diagram duplicate methods

查看:566
本文介绍了UML序列图重复方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

零售商更新库存时可以进行两项操作,即更新现有记录或添加新记录.因此,在执行了这两项操作之后,控制器将调用updateView()方法来更改主页视图.我在一起使用过三次,所以可以调用相同的方法吗?我已经添加了图片作为参考.

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.

推荐答案

否.那不行首先:零售商不会直接调用UIController的方法.他将始终使用视图"(主页).然后,这些交互将由UIController进一步处理.您不得通过任何实例进行快捷呼叫.

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.

现在,当您在示例的主页中单击保存"时,这些可能是不同的保存.解决此问题的方法有两种:一种是拥有多个视图(主页面A,主页面B等,或者更具体地显示内容).其次是正确命名被单击的按钮.那就是Save A,Save B等.

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.

这篇关于UML序列图重复方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆