简体   繁体   English

我如何表示用例的条件?

[英]How do i represent conditions on use cases?

I'm in the specification part of a project and i have to make use cases but i don't understand how to translate this scenario.我在一个项目的规范部分,我必须制作用例,但我不明白如何翻译这个场景。 The project is: Students and teachers have to check in with a card in every class and the system counts presences and absences, if the teacher doesn't check in it doesn't count any absences because it's like there was no class.该项目是:学生和教师必须在每个 class 中使用一张卡签到,并且系统会计算存在和缺勤,如果教师不签到则不会计算任何缺勤,因为就像没有 class 一样。 When the student reaches 25% absences the system sends an email to the teacher and student warning them.当学生缺勤率达到 25% 时,系统会向教师和学生发送 email 警告他们。

My question is should the act of "checking in" be the same use case if it has different repercussions for each actor?我的问题是,如果“签到”行为对每个参与者产生不同的影响,它是否应该是同一个用例? How do i represent that if the teacher didn't check in then there's no class?我如何表示如果老师没有签到就没有 class?

A use case is not dynamic view of the system, like flow control.用例不是系统的动态视图,如流控制。 it's a list of use case, main fonctionnality with a goal.它是一个用例列表,具有目标的主要功能。 The only condition that may appear is about extension point for extend use case可能出现的唯一条件是关于扩展用例的扩展点

A use case is a use case.用例是一个用例。 It shows the added value it will deliver to its primary actor.它显示了它将为其主要参与者提供的附加值。 There is nothing that changes a UC due to scenarios running the one or other way.由于以一种或其他方式运行的场景,没有什么会改变 UC。

In order to show conditions you need to add constraints.为了显示条件,您需要添加约束。 There is no need to show them in a UC diagram since there might be too many and will just confuse readers.没有必要在 UC 图中显示它们,因为它们可能太多,只会让读者感到困惑。 If at all you want to show constraints you place them in a note and put curly brackets around the text like { this is some constraint} .如果您想显示约束,请将它们放在注释中并在文本周围放置大括号,例如{ this is some constraint} A better place for constraints (unless your UML tool offers something better) is a textual description of the UC containing a table of constraints (along with scenarios etc.).约束的更好位置(除非您的 UML 工具提供更好的东西)是包含约束表(以及场景等)的 UC 的文本描述。 Use a template from Cockburn or something similar.使用来自 Cockburn 的模板或类似的模板。

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

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