Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

OMG Exam OMG-OCUP2-FOUND100 Topic 1 Question 35 Discussion

Actual exam question for OMG's OMG-OCUP2-FOUND100 exam
Question #: 35
Topic #: 1
[All OMG-OCUP2-FOUND100 Questions]

Choose the correct answer: Consider the following diagram:

Is this diagram valid?

Show Suggested Answer Hide Answer
Suggested Answer: A

The provided diagram depicts a DataType named Route with operations, attributes, and associations to a Class named City. In UML, a DataType is a type of classifier that specifies the values that do not have identity (i.e., are not distinguishable from other objects). DataTypes may contain Attributes and Operations, so options B and C are incorrect.

However, DataTypes should not have associations to Classes because DataTypes are meant to be value types without identity, and associations typically imply a relationship between instances (which have identity). Thus, the presence of associations from Route to City is not consistent with the definition of a DataType.


UML 2.x Superstructure Specification: Sections on Classifiers and DataTypes provide definitions of what constitutes a DataType and what features they can have. They specifically mention that DataTypes are kinds of classifiers that do not have identity and are often used to type attributes.

UML 2.x Infrastructure Specification: This foundational document gives additional context on the semantics of different types of classifiers, including DataTypes, and how they relate to other elements in a UML model.

Contribute your Thoughts:

Dominic
3 hours ago
Definitely B. A DataType can't have Operations, that's just not how it works!
upvoted 0 times
...

Save Cancel