Does a relation (aggregation, composition) replace an attribute?

后端 未结 3 498
野趣味
野趣味 2020-12-30 15:41

I\'m pretty new at UML modelling so bear with me.

Say I have a class with an attribute students that is a list of Student instances. I have

3条回答
  •  醉梦人生
    2020-12-30 16:09

    You generally do not have attributes of a user-defined (or any complex) class. You certainly don't show an attribute AND an association for the same thing in UML. If I understand your situation, you're in need of an association (or aggregation/composition)... And play with the multiplicities to get it right.

提交回复
热议问题