Exam OMG-OCUP2-FOUND100 Topic 1 Question 4 Discussion
Actual exam question for OMG's OMG-OCUP2-FOUND100 exam
Question #: 4
Topic #: 1
Question #: 4
Topic #: 1
Choose the correct answer:
Given the diagram fragment below:

What are the possible values for the attribute response in the class Query?
Given the diagram fragment below:

What are the possible values for the attribute response in the class Query?
Suggested Answer: B Vote an answer
The second diagram fragment you provided includes two enumeration types, YesNo and Answer, where YesNo is a generalization of Answer. The class Query has an attribute 'response' of type Answer. Given that YesNo is a generalization of Answer, the possible values for 'response' include the literals of Answer plus those inherited from YesNo. Since Answer includes 'Maybe', and YesNo includes 'Yes' and 'No', all three are valid values for 'response'.
References:
* UML 2.x Superstructure Specification: Discusses attributes and their types, the concept of generalization, and how attributes of a generalized type can take on values from their own literals as well as those from their parent in the hierarchy.
* UML 2.x Infrastructure Specification: Explains the foundational modeling constructs related to enumeration, classes, and attributes, which provides the basis for determining the legal values of an attribute based on its type's enumeration literals.
References:
* UML 2.x Superstructure Specification: Discusses attributes and their types, the concept of generalization, and how attributes of a generalized type can take on values from their own literals as well as those from their parent in the hierarchy.
* UML 2.x Infrastructure Specification: Explains the foundational modeling constructs related to enumeration, classes, and attributes, which provides the basis for determining the legal values of an attribute based on its type's enumeration literals.
by Lindsay at Nov 19, 2024, 02:12 PM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).