Deepak
Deepak

Reputation: 47

What does these UML symbol means

I was going through UML class diagram in the class attributes what does the below symbol means?

~ package (default)
/ derived

I tried to search but didn't get much clue.Could any one tell me what these symbols means?

Upvotes: 0

Views: 602

Answers (1)

Ister
Ister

Reputation: 6318

As per definition

package (~)

A NamedElement with package visibility is visible to all Elements within the nearest enclosing Package (given that other owning Elements have proper visibility). Outside the nearest enclosing Package, a NamedElement marked as having package visibility is not visible. Only NamedElements that are not owned by Packages can be marked as having package visibility.

Which means all elements in the same package have access to an element with package visibility while elements outside the package cannot access it.

derived (/)

If a Property has isDerived = true, it is derived and its value or values may be computed from other information. Actions involving a derived Property behave the same as for a nonderived Property. Derived Properties are often specified to be read-only (i.e., clients may not directly change values). But where a derived Property is changeable, an implementation is expected to make appropriate changes to the model in order for all the constraints to be met, in particular the derivation constraint for the derived Property. The derivation for a derived Property may be specified by a constraint.

Which means the property is not represented as such in the element, but rather comes as a result of some calculation. It is important though from the perspective of a model e.g. if you have on attribute for a father and one attribute for a mother you know who parents are. But sometimes you're more interested in an attribute parent. Thus parent would be derived.

Upvotes: 4

Related Questions