gpt4 book ai didi

uml - 如何在序列图中显示 "if"条件而不用 else

转载 作者:行者123 更新时间:2023-12-01 07:53:16 27 4
gpt4 key购买 nike

我想知道你如何设计一个在你的序列图中没有“else”的 if 条件?我不知道我是否必须用替代方案来做,因为我只有一个案例或什么都没有,所以我没有任何替代方案。
谢谢您的回答。

最佳答案

不需要包含多个操作数。

规范 (17.6.2) 只要​​求每个片段至少有一个操作数(alt 种类没有其他限制)。

enter image description here

所以你可以这样做

enter image description here

同样正如托马斯指出的那样,您可以使用 选择 ,这是等效的(强调我的):

An option is semantically equivalent to an alternative CombinedFragment where there is one operand with non-empty content and the second operand is empty.

关于uml - 如何在序列图中显示 "if"条件而不用 else,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38527463/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com