如何在用例图中描绘可见性

程序初学者

语境

想象一下一个活动管理网站,活动策划者可以在网站上发布活动。假设我们有三个角色:一non-registered userregistered userEvent Planner活动策划者可以发布可以公开(非注册用户可以看到)或私人(只有注册用户可以看到)的事件。

我该如何描述所有用户都可以看到公共事件而只有注册用户可以看到私人事件的事实?

附加问题:我应该将“查看即将发生的事件”和“查看过去的事件”分为两个不同的用例,还是应该拥有一个“查看事件”用例?

我有一些想法

下图是我想到的一些潜在解决方案,但我不确定它们的正确性。

有单独的用例

在此处输入图片说明

使用扩展

在此处输入图片说明

将“查看事件”作为总体用例

在此处输入图片说明

qwerty_so

Either you go with Geert's suggestion and use just a See events use case or you should stay with your first one. Whether you split the See events into private/public heavily depends on the system you are designing. So, taken that there is a need for a split (since both events will be looked at very differently) you should go with your first sketch. Here it's clear who can deal with which UC. With just a single UC you could attach a constraint like {only registered user can see private events}.

Your 2nd one does not seem to make sense. The «extend» is superfluous as the actor already has direct relation to the use case. The relation would mean that the extending use case is optinally performed in the course of events. So somewhere while seeing private events there's a path to also seeing public events.

最后的建议只是功能分解。与参与者没有关系的用例不是用例,因为它不会带来附加值。您可以使用通用的用例(专用/公共是的专用See event),但我始终建议不要使用该构造。UC的泛化有些矛盾。UC必须显示给正在考虑的系统的参与者带来的独特增值。但是,如果您可以概括一下,那么它并不是唯一的。而且,与类别归纳法(其中明确定义了属性/操作替代)不同,UC缺乏此类描述,并且需要做很多解释。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

如何在TextInputLayout Android中更改setEndIconDrawable的可见性(可见,不可见或不可见)?

来自分类Dev

如何在WPF中设置ProgessBar的可见性?

来自分类Dev

如何在Jsoup中检查元素的可见性?

来自分类Dev

如何在更改可见性的同时更改背景?

来自分类Dev

如何在Xamarin表单中动态设置列表视图中项目的元素可见性

来自分类Dev

如何在Android Studio中将GONE可见性更改为VISIBLE可见性

来自分类Dev

如何覆盖标签可见性?

来自分类Dev

类可见性与测试用例

来自分类Dev

ProgressBar的可见性

来自分类Dev

JPanel可见性

来自分类Dev

对象可见性

来自分类Dev

ProgressBar的可见性

来自分类Dev

分区可见性

来自分类Dev

JPanel可见性

来自分类Dev

SSRS可见性

来自分类Dev

抽屉可见性

来自分类Dev

如何在UWP应用中使用后退功能更改网格的可见性?

来自分类Dev

如何在leaflet.js中切换初始层可见性

来自分类Dev

如何在Web API MVC项目中使用显示而不是可见性?

来自分类Dev

如何在不同片段中设置ActionBar项的可见性

来自分类Dev

如何在Windows 10上检测应用程序可见性

来自分类Dev

如何在单击按钮时临时禁用鼠标悬停效果可见性?

来自分类Dev

如何在iOS中设置像Android这样的可见性?

来自分类Dev

如何在C ++ Builder中更改TMenuItem的可见性?

来自分类Dev

如何在GridView中的DataTemplate中更新UI元素的可见性

来自分类Dev

如何在同一活动中切换不同TextView的可见性

来自分类Dev

如何在Windows Forms C#中切换可见性

来自分类Dev

如何在WooCommerce循环中获得产品可见性?

来自分类Dev

如何在WPF中设置形状的笔触可见性

Related 相关文章

热门标签

归档