如何表明用例已经结束?

时间:2010-07-16 14:30:25

标签: oop uml use-case

假设我正在制作关于填写测验的Use Case。你只有5分钟的时间来完成测验。在为“填写测验”进行Use Case时,我应该如何发出时间限制信号,之后Use Case完成了?我只是用文字写的,还是有更正式的用途?

我的用例可以是草图:

 1. The Actor tells the System he's ready to start the quiz.
 2. The System presents the Actor with the first question of the Quiz and its 4 possible answers and tells him how much time he has left.
 3. The Actor tells the System what is his chosen answer (a number between 1 and 4).

Repeat steps 2-3 until there are no questions left.

 4. The System registers the results of the quiz.

我可以在上面显示的所有内容之间进行操作,以便在剩下的时间结束时进行检查,但是可能有更好的方法来显示它。

由于

2 个答案:

答案 0 :(得分:6)

您可以使用其他流量超时情况,例如

Alternative Flow 1: Timeout
2. The System detects that ... 

答案 1 :(得分:0)

为了更准确一点,但同意其他答案一般来说,对于这种情况,Alistair Cockburn(编写有效用例)建议使用扩展用例(备用流程),这将在其扩展点中具有时间限制。在文本形式中,您可以轻松使用场景线的数量范围,可以发生超时。