我正在创建这个序列图,并想知道要包含哪些方法。 我已经在每个方法中包含了所有方法,例如,
handleCustomerAccountAction()方法,从另一个名为getListOfCustomers()类中getListOfCustomers()一个方法
这是正确的,或者您只需要包含方法而不是它内部使用的所有方法?
另外,可以在其他方法上多次显示相同的方法吗? 例如,该方法
getListOfCustomers()显示三次(围绕它的循环),但来自不同的方法。
这是我的序列图的图像:
I am creating this sequence diagram, and wondered exactly what methods to include. I have included all methods in every method, for example, the
handleCustomerAccountAction()method, got a method from another class called getListOfCustomers()
Is that right to do, or do you only have to include the method and not all the methods it uses inside it?
Also, is it okay to show the same method multiple times on other methods? For example the method
getListOfCustomers()is shown three times (the one with a loop around it), but from different methods.
Here is the image of my sequence diagram:
最满意答案
它总是取决于你想要展示什么。 SD显示您想要详细解释的某种协作。 SD应该专注于某个方面,并且不得显示每个消息(例如,可以简单地省略某些呼叫分支)。 但是,如果方法在序列中被调用两次,则必须在重要时显示它。
It always depends on what you want to show. A SD shows a certain collaboration you want to explain in detail. A SD should focus on a certain aspect and must not show each and every message (e.g. certain call branches can simply be left out). However, if a method is called twice in a sequence you must show it if it's of importance.
更多推荐
发布评论