gpt4 book ai didi

uml - 用例图——箭头是绝对必要的吗?

转载 作者:行者123 更新时间:2023-12-03 04:24:16 27 4
gpt4 key购买 nike

是否绝对有必要使用“箭头”来显示用例图中参与者和用例之间的关联?

我最近不得不为我的软件工程作业画一张。但是,在对许多其他大学的许多文章、论文、在线书籍和讲义进行了一些在线研究之后,似乎大多数用例图,无论它们有多大潜力来显示某种“流程”或“导航性” ",没有箭头,而某些示例有箭头。

因此,我咨询了我的 friend ,他是一名最后一年的学生,并且已经研究了我告诉我的内容,我的 Actor 和用例之间不应该有箭头,甚至他的需求工程讲师也教学生不要使用箭头。因此,我有意识地决定不使用箭头,而是使用实线来显示我的用例关联。

Here is my diagram .

然而,当我收到作业分数时,我惊讶地发现我因为不使用箭头而得了零分。即使强制使用它们,也有大量证据表明实线可用于双向关联。那么我不应该至少获得一些分数吗?

显然,我要求我的讲师做出解释,我下周将见到他来讨论这一点,但如果她告诉我我应该使用箭头,我可以提出什么论据来反对它?

<小时/>

编辑

这整个困惑的开始是因为讲师提供的唯一符号是一个讲义中的一个非常简单的库用例图示例,其中有箭头。但并没有明确表明这是最终的符号。我不认为这是强制性的另一个原因是,在解释绘制数据流图的符号时,她非常清楚地使用了她的特定符号,但 DFD 在不同的符号中使用不同的符号并不罕见。不同的来源,而我几乎找不到证据表明在用例图中使用箭头是必要的。

也就是说,即使在没有箭头的情况下,我记得在辅导类(class)中询问一位导师(不是讲师)有箭头线和实线之间有什么区别,他说没有,我可以两者都用。显然,我只有我自己的话,从你们所说的来看,我怀疑任何处于学术地位的人都会承认说出了一些可能使他们处于防御地位的事情。我的错误在于没有直接与讲师交谈,但事后看来我显然会这么做。

无论如何,我会就所有这些信息与她交谈,并要求她考虑这个“无心错误”。这不仅仅是用例图,还有其他几个问题,我在这些问题上丢了异常多的分数,特别是当我的答案与她提供的模型答案几乎相同时。我还知道很多其他学生要求对他们的作业进行评论。

<小时/>

编辑2

我还有一个问题。这是作业中给出的用于绘制用例图的场景。

CONTHETICKET is a ticket agencydealing in Concert and Theatretickets. Concert and theatre venuesprovide CONTHETICKET with a constantstream of information on forthcomingevents, which is then used by theManager to compile a fixture list foruse by the sales staff in respondingto customer calls. The manager selectssome events for which CONTHETICKETwill purchase a number of tickets inadvance, thereby benefiting fromdiscounts negotiated with the venues.

He personally sends the orders for thetickets together with the agreedpayments to the venues, and oncetickets are received, he files them inthe ticket File.

When customers ring the sales team,their ticket requests are checkedagainst the ticket file. Ifpre-purchased tickets are availablethey are put in an envelope markedwith the customer's name and address,and filed in a provisional ordersfile. If not, the sales team fills outa ticket request form and put it in atray for collection by the post clerk.

The payments section checks theprovisional orders file daily. Theysend an invoice to the customer andawait payment. A copy of the invoiceis kept on file. When a payment isreceived, the payments section matchthe payment with the appropriateinvoice, and if satisfied placeanother copy of the invoice in adespatch file with instructions todespatch the tickets.

The post clerks checks the despatchfile each day and retrieves theappropriate tickets from theprovisional orders file and sends themto the appropriate customers.

my diagram 可以看出作为一名 Actor ,我有一个“音乐会和剧院 field ”。

来自《UML 2.0 风格的元素》,Scott W. Ambler:

An actor is a person, organization, or external system that plays a role in one or more interactions with your system (actors are typically drawn as stick figures on UML Use Case diagrams).

然而,在我批改的作业上,讲师评论说不应该是 Actor 。这应该是一名 Actor 吗?如果是的话,为什么?

我背后的理由是 CT&V 提供事件信息,然后经理使用这些信息来订购/归档门票,这些信息也由 CT&V 提供。

最佳答案

好消息

你的图表绘制正确,而你的老师错误:

  • 箭头在用例关联中不合适,因为它们是二元关联
  • 扩展、包含和使用关系需要箭头 - 请参阅this diagram举个三个例子

UML specification v1.4.2 [PDF 警告] 第 4.11.3 节格式正确规则和第 5.42.2 节二元关联在以下几点上非常明确:

4.11.3 Well-Formedness Rules: "Actors can only have Associations to UseCases, Subsystems, and Classes and these Associations are binary."
5.42.2 Binary Association: "A binary association is drawn as a solid path connecting two classifier symbols"

坏消息

话虽这么说,如果你的老师告诉你使用箭头而你没有,那么你可能没有追索权 - 这是学术界的缺点之一:一些教授希望学生只是重复他们被告知的内容,即使这是错误的。你可以向系主任提出申诉,认为教授对学生的指导违反了既定标准,但这很可能只会给你带来悲伤。不过,我确实认为你会有一个强有力的理由,因为因为你没有画出不正确的箭头而在正确的图表上给你一个零似乎有点过分、苛刻和不合理。

但我遇到过一些教授,他们总是对的,即使他们明显错了。然而,大多数人都是理性/合乎逻辑的人,他们乐于适当纠正错误信息。

注意:轻踩

假设这是一个无心的错误,并要求教授解释为什么当官方 OMG UML 规范说不要使用箭头时他期望箭头(因此每个用例的兼容 UML 工具都会>不在二元关系上画箭头)。如果你带着枪声去那里,你可能会或可能不会得到满足,但你也可能会产生敌意,这可能会让本学期剩下的时间(甚至可能更长)变得非常不愉快。

编辑:我确实相信旧的工具和标准在用例图上使用单个箭头(不是三角形或填充的,只是“翅膀”),但现在不再这样做了。也许教授的标准 - 或软件 - 已经过时了;-)

关于uml - 用例图——箭头是绝对必要的吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/455373/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com