W089 Association Rolename Matching Classname
[Previous]  [Next] 
|
![]() |
![]() ![]() ![]() User Manual [Previous]  [Next] W089 Association Rolename Matching ClassnameUmple semantic warning issued when assigning a role to an association that matches the class name The role name of an association is used to explain how a class participates in a relationship.
A role name that matches the class name may be unnecessary, since it provides little clarification as to the relationship between the classes.
Example//This example generates the warning message class Person { name; } class Intern { isA Person; * -- 0..2 Employee employee; } class Employee { isA Person; } Load the above code into UmpleOnline Solution to The Above So the Message No Longer Appears//This example shows how to avoid the warning class Person { name; } class Intern { isA Person; * -- 0..2 Employee supervisor; } class Employee { isA Person; } Load the above code into UmpleOnline |