UML 用例:列表与图表 [英] UML use case: listing vs diagram

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

问题描述

我对正在阅读的书感到困惑.

I'm confused about a book I'm reading.

我一直在考虑使用某种带有演员和气泡的图表的用例,例如维基百科中的这个:

I always thought use cases where some kind of diagram with actors and bubbles like this one from wikipedia :

但是在 Head First 面向对象分析和设计 - O'Reilly 中,什么被称为用例"只是包含主要/快乐路径和备用路径的列表.

But in Head First Object-Oriented Analysis and Design - O'Reilly, what are called "use cases" are just listings with main/happy paths and alternate paths.

O'Reilly 在此处提供了本书的示例(您可以滚动到 pdf 的第 71 页,即本书的第 123 页),这些列表如下所示:

O'Reilly provides a sample from this book here (you can scroll to page 71 of the pdf, which is page 123 in the book) and these listings look like:

Main Path
1. Fido barks to be let out.
2. The bark recognizer "hears" a bark.
3. The bark recognizer sends a request to the door to open.
4. The dog door opens.
5. Fido goes outside.
6. Fido does his business.
6.1. The door shuts automatically.
6.2. Fido barks to be let back inside.
6.3. The bark recognizer "hears" a bark (again).
6.4. The bark recognizer sends a request to the door to open.
6.5. The dog door opens (again).
7. Fido goes back inside.
8. The door shuts automatically

哪个是官方用例",清单还是图表?

Which is the official "use case", the listing or the diagram?

我想该图可以转换为几个清单,但我不知道如何将清单转换为用例图.他们甚至有关系吗?

I guess the diagram can be converted to a few listings, but I don't see how the listing can be converted to a use case diagram. Are they even related?

哪个错了?维基百科,这本书,或者,最有可能的,我?(为什么?)

Which one is wrong? Wikipedia, this book or, most probably, me? (and why?)

推荐答案

一个用例可以用两种不同的方式表示:

A use case can be represented in two different ways:

  1. 从图形上看,它通常绘制为椭圆形,并包含对用例应该交付什么的简短描述.许多用例共同构成了用例图

  1. graphically it is usually drawn as an oval, and contains a short description of what the use case is supposed to deliver. Many use cases together form the use case diagram

每个用例的详细信息通过写下用例的每个路径来描述.这些路径也可以称为列表或场景.

The details of each use case are described by writing down each path through the use case. These paths can also be called listings or scenario's.

所以,你们都是对的:用例可以被描述为一组列表/场景/路径,或者用用例图中的椭圆来描述.它们都是一样的.

So, you are both right: a use-case can be described as a set of listings/scenario's/paths, or by an oval in a use-case diagram. They are both the same.

因此,在您的示例中,尝试通过写下服务员实际将食物从厨房送到正确餐桌所需执行的所有步骤来描述提供食物"用例,您将获得以下列表步骤.

So, in your example, try to describe the "serve food" use case by writing down all the steps the waiter needs to perform to actually get the food from the kitchen to the right table, and you will have your list of steps.

这篇关于UML 用例:列表与图表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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