In the years I’ve been working with different modelling teams I’ve found that the rule that works best is to use Associations for Classes and Attributes for DataTypes. A data type is a special kind of classifier, similar to a class. It differs from a class in that instances of a data type are identified only by their value.
I kind of agree with the author, adding another point: your class diagram should beunderstandable. If you have a diagram with many lines crisscrossing each other the diagram is useless. When this happens you must try to find relations that can be modeled using attributes without loosing too much visual information, and replace them with attributes.
Another thing that you can do with relations and not with attributes is to display bi-directional relations (you can do this with one attribute in each class of the relation, but you loose the semantics of the relation).
answeredMar 29Nomio55544.8k points
ask related questioncomment
Your comment on this answer:
|Your name to display (optional):|
|Email me at this address if a comment is added after mine:Email me if a comment is added after mine|
|Privacy: Your email address will only be used for sending these notifications.|
|What is the color of the sky?
To avoid this verification in future, please log in or register.
1 answer799 views
A relationship is an association between _____?
Problem: A relationship is an association between _____? a. objects b. entities c. databases d. fields
askedJul 22, 2020ArifulIslam9.9k points
1 answer12 views
error: lvalue required as left operand of assignment
Problem: I have found a problem.Who is here to solve explaining why did Ivalue require as left operand of assignment?
askedMar 26ashik14.6k points
1 answer18 views
value required as left operand of assignment
Problem: Please help me. How can I solve it? value required as left operand of assignment
askedMar 13MUHAMMAD MUNEEB83k points
1 answer16 views
Error: assignment of read-only location
Problem: Error: assignment of read-only location
askedJul 22nila178k points
1 answer101 views
error: assignment to expression with array type
Problem: How to fix the following error: assignment to expression with array type?
askedApr 3ashik14.6k points
1 answer143 views
You should not define a class field that is dependent upon the values of other class fields?
Problem: You should not define a class field that is dependent upon the values of other class fields: A) in order to avoid having stale data B) because it is redundant C) because it should be defined in another class D) in order to keep it current
askedAug 4, 2020ArifulIslam9.9k points
1 answer182 views
Validation loops are also known as?
Problem: Validation loops are also known as?
askedJul 22, 2020sstones830 points
1 answer16 views
A subclass has what kind of relationship to a superclass?
Problem: Is there a solution for this : A subclass has what kind of relationship to a superclass?
askedJun 24nila178k points
1 answer9 views
fast algorithms for mining association rules in large databases
Problem: fast algorithms for mining association rules in large databases
askedAug 27Shifa44.6k points
1 answer41 views
Bessel function of the first kind matlab
Problem: Need to facilitate with this : Bessel function of the first kind matlab
askedJun 5Sawyer Parviz217k points