Use case Actor generalization 用例参与者泛化

huangapple go评论59阅读模式
英文:

Use case Actor generalization

问题

你的用例图是否正确?

Use case Actor generalization
用例参与者泛化

我需要知道我的用例图是否正确,如果管理员从经理继承,经理从技术员继承,这是否意味着管理员和技术员之间的泛化是不必要的,可以通过经理和技术员之间的关系来实现?

英文:

Is my use case diagram correct ?

Use case Actor generalization
用例参与者泛化

I need help to know if my use case diagram is correct or not, and if the actor admin inherits from manager, and manager inherits from technician, does that mean the generalization between admin and technician is unnecessary and can be done through the relation between manager and technician?

答案1

得分: 0

你图表中的泛化意味着:

  • Manager -|> Technician:每个 Manager 的实例也是 Technician 的实例。
  • Admin -|> Manager:每个 Admin 的实例也是 Manager 的实例。

这意味着每个 Admin 的实例也是 Technician 的实例,即 Technician 也是 Admin 的泛化。

因此,Admin 和 Technician 之间的直接继承关系是多余的。这不是错误,但考虑到多重继承让一些人感到不舒服,我建议避免它。

英文:

The generalizations in your diagram means that:

  • Manager -|> Technician : every instance of Manager is also an instance of Technician.
  • Admin -|> Manager : every instance of Admin is also an instance of Manager.

This implies that every instance of Admin is also an instance of Technician, i.e that Technician is also a generalization of Admin.

Your direct inheritance between Admin and Technician is therefore redundant. It is not wrong, but considering that multiple inheritance make some people unconfortable, I'd suggest to avoid it.

huangapple
  • 本文由 发表于 2023年6月8日 06:08:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/76427396.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定