gpt4 book ai didi

java - UML 类图 - 多重关联

转载 作者:行者123 更新时间:2023-12-02 02:30:21 25 4
gpt4 key购买 nike

需要描绘高中管理系统的 UML 类图。

  • 学生和教师源自人
  • 每个学生属于 1 个(学校)类(class)
  • 每个类(class)有 10-25 名学生
  • 每位教师均拥有 >= 1 份教授(学校)科目的证书

[Draft of Elements]

此外,要求设计以下内容:

a) which Teacher, teaches which Class, in which Subject, for how many hours/week?
b) is there a safe way to assure that a Teacher only teaches Subjects he has a Certificate for?

经过几个小时的模糊测试,我想出了这个:[Complete Draft]

但我仍然无法想象如何设计图表,以便按要求呈现a)中的所有(或至少三个)条件。

实际上有办法在 UML 图中做到这一点吗?

编辑:阅读 Ayo K 的评论后,我想到了这个:img

最佳答案

我会使用带有约束的关联类。

enter image description here

关于java - UML 类图 - 多重关联,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47227304/

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