UML notation for derived elements: Is a derived attribute or association typically shown with a leading slash “/”, or alternatively by using a stereotype «derived» before the element name?

Difficulty: Easy

Correct Answer: Incorrect

Explanation:


Introduction / Context:
The question probes your knowledge of how UML visually marks derived elements—those whose values are computed from other information rather than stored independently. Consistent notation helps reviewers quickly understand which values are calculated and which are base data.


Given Data / Assumptions:

  • We are identifying standard UML ways to show derivation.
  • The statement suggests two alternatives: a slash “/” or a stereotype notation «…».
  • We assume common UML 2.x conventions used in practice and tools.


Concept / Approach:
UML specifies that a derived feature is indicated by a leading forward slash “/” placed before the element’s name. An additional, accepted form is to use a property string such as {derived}. By contrast, a stereotype uses guillemets « » and extends metamodel semantics; «derived» is not the standard way to show a computed property and can be misleading. Therefore, while “/priceWithTax” is correct, claiming that a stereotype before the name is the typical alternative is inaccurate.


Step-by-Step Solution:

Recognize that “/” marks derivation: for example, /total.Recall the property-string alternative: {derived}.Note that a stereotype «derived» is not the conventional indicator of derivation for attributes/associations.Conclude that the statement is incorrect because it misidentifies the second notation.


Verification / Alternative check:
Inspect UML references and modeling tools: most show derived features using the “/” prefix and optionally {derived}. Few use a stereotype to convey the same idea for attributes.


Why Other Options Are Wrong:

  • “Correct” is wrong because the stereotype claim is not standard.
  • “Only the stereotype” or “derived elements are not marked” contradict mainstream UML practice.
  • “Only the slash; stereotypes are forbidden” overstates—the {derived} property-string is also acceptable.


Common Pitfalls:
Confusing stereotypes (which extend metaclasses) with property strings; forgetting the leading slash for computed features in diagrams.


Final Answer:
Incorrect

More Questions from Object-Oriented Data Modeling

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion