Choose the correct answer: Consider the following diagram:
Is this diagram valid?
A.
No, because a DataType cannot have Associations to a Class.
B.
No, because a DataType cannot have Operations.
C.
No, because a DataType cannot have Attributes.
D.
Yes, it is formally correct.
The Answer Is:
A
This question includes an explanation.
Explanation:
The provided diagram depicts aDataTypenamed Route with operations, attributes, and associations to aClassnamed City. In UML, aDataTypeis a type of classifier that specifiesthe values that do not have identity (i.e., are not distinguishable from other objects).DataTypesmay contain Attributes and Operations, so options B and C are incorrect.
However,DataTypesshould not have associations toClassesbecauseDataTypesare 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 aDataType.
References:
UML 2.x Superstructure Specification: Sections on Classifiers and DataTypes provide definitions of what constitutes aDataTypeand what features they can have. They specifically mention thatDataTypesare 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, includingDataTypes, and how they relate to other elements in a UML model.
OMG-OCUP2-FOUND100 PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 60% Discount on All Products,
Use Coupon: "8w52ceb345"