关于选择哪个 UML 图进行自助结账的建议 [英] Advice on which UML diagram to choose for self service checkout
问题描述
一个家庭作业问题:
使用适当的 UML 图来描述使用自助结账从商店购买东西的过程.
Use an appropriate UML diagram, to describe the process of using a self-service-checkout to purchase stuff from a shop.
该图表应主要关注结账软件在完成交易时所需采取的行动.
The diagram should focus primarily on the required actions taken by the checkout software in completing the transaction.
我选择将此作为活动图,因为它清楚地显示了结账软件在完成交易时采取的行动.
I have chosen to do this as a activity diagram as it clearly shows the actions taken by the checkout software in completing the transaction.
这是正确的方法吗?有什么建议吗?
Is this the correct approach? Any advice?
推荐答案
要求是描述一个过程并关注一些动作.您可以将此视为一种反射:在 UML 中,流程和流程分解最好用以下方式描述活动图.
The requirement is to describe a process and focus on some actions. You can take this as a reflex: in UML, processes and process decomposition are best described with activity diagrams.
您可以通过排除推理来证实这个结论.在所有UML图中,过程和动作是关于系统而不是结构.所以它必然是一个行为图:
You can corroborate this conclusion, reasoning by elimination. Among all the UML diagrams, processes and actions are about behaviors of the system and not structure. So it's necessarily a behavioral diagram:
- 您可以轻松消除用例,因为它们的重点是目标.此外,用例之间没有顺序,这使得它们不适合描述动作流.
- 您还可以消除交互图,因为重点是元素及其交换.
- 状态机图可以表示完成某些行为所需的事件或操作流.但重点更多的是状态,以及状态之间的转换是如何触发的.所以它更像是相反的焦点.
这篇关于关于选择哪个 UML 图进行自助结账的建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!