简体   繁体   English

UML用例图后置条件实现(带图)

[英]UML Use-case diagram postcondition implementation (with diagram)

I'm learning UML by trying to simulate how a car service garage works with diagrams and documentation. 我正在通过尝试模拟汽车维修厂如何使用图表和文档来学习UML。 One problem I have is with postcondition (or rather, GOTO) statements. 我遇到的一个问题是后置条件语句(或GOTO语句)。

Is the dashed line << include >> relationship only for preconditions? 虚线<< include >>关系仅适用于先决条件吗? Can Use-case bubbles connect to eachother and follow a logic path? 用例气泡可以相互连接并遵循逻辑路径吗?

So this is what I have so far.. 1) Is the 'Settle Payment' bubble in the wrong place? 因此,这就是我到目前为止的情况。1)“和解付款”泡沫是否放置在错误的位置? Should it have been << include >>ed to the other bubbles? 是否应该在其他气泡中添加“包括”? 2) Should I associate the 'request service' bubbles to the technician too as he will be the one fixing the car? 2)我是否也应将“请求服务”气泡关联到技术人员,因为他将是修理汽车的技术人员?

Image 图片

http://i.stack.imgur.com/iIBIt.jpg

Use Cases are like classes. 用例就像类。 They have inheritance (extends) and relationships like includes and uses. 它们具有继承(扩展)和诸如包含和使用之类的关系。

Preconditions are common relationship constraints. 前提条件是共同关系约束。 Some of us write the preconditions and postconditions in the text of the use case. 我们中的一些人在用例的文本中写下了前提条件和后置条件。 You can draw it, but it isn't required. 您可以绘制它,但这不是必需的。

Do not try to sequence the use case bubbles. 不要尝试对用例气泡进行排序。 That's what activity diagrams and sequence diagrams are for. 这就是活动图和序列图的用途。 That's what narrative text is for. 这就是叙事文本的目的。 That's something the users already know. 用户已经知道了这一点。

Also, don't waste a lot of time treating the use cases as a super-high-level programming language. 同样,不要浪费太多时间将用例视为超高级编程语言。 Remember, the actors already know what they're doing; 记住,演员们已经知道自己在做什么。 they don't need help sequencing things. 他们不需要帮助进行排序。

You need to focus on capturing the actors, the use cases, and basic "extends", "uses", "includes" among the use cases. 您需要集中精力捕获参与者,用例以及用例中的基本“扩展”,“使用”,“包含”。 Use Case models are not programming. 用例模型未编程。 The use case diagram is knowledge capture of "who" and "what". 用例图是“谁”和“什么”的知识捕获。

Think of it as more like a security model that defines what the actors can do. 认为它更像是定义参与者可以做什么的安全模型。 Order, sequence, and other details don't matter as much as what the actors do. 顺序,顺序和其他细节与演员所做的无关紧要。

When you have Actor associated with actor (like Technician and Front Desk), you're saying that the actors interact outside the system. 当您将Actor与actor相关联时(例如Technician和Front Desk),您是说actor在系统外部进行交互。 You're saying that the tech never logs in to the system to do get their work or log their time. 您是在说技术永远不会登录系统来完成工作或记录时间。

If the technician actually will log in to get work and record time, then the technician participates in some use cases. 如果技术人员实际上将登录以获取工作并记录时间,则该技术人员将参与某些用例。

Use cases aren't programming. 用例不是编程。 They're things actors do. 它们是演员要做的事情。 Use cases are connected by virtue of being built in a big, common piece of software. 用例通过内置在大型通用软件中而得以连接。 You don't need to draw data flow or logic arrows among the use cases. 您无需在用例之间绘制数据流或逻辑箭头。 They can all be largely independent. 它们都可以在很大程度上独立。

When you design the system, you'll implement UI features and database features that connect the use cases in some sequence. 在设计系统时,将实现UI功能和数据库功能,这些功能按顺序将用例联系起来。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM