Exam OMG-OCUP2-FOUND100 Topic 1 Question 69 Discussion

Actual exam question for OMG's OMG-OCUP2-FOUND100 exam
Question #: 69
Topic #: 1
Choose the correct answer:
Which diagram shows inherited properties?

Suggested Answer: B Vote an answer

In UML, inherited properties are those attributes that are defined in a superclass and inherited by a subclass.
According to UML notation, when a subclass inherits from a superclass, it inherits all the attributes and operations of the superclass unless they are redefined.
Let's examine each option:
A: In Option A, the Customer class shows the attributes name and address repeated from the Person class. This is not necessary in UML to show inheritance and could imply these are different attributes that happen to have the same name.
B: In Option B, the attributes of the Person class are not shown in the Customer class. This is correct as UML assumes that all attributes and operations are inherited by the subclass, and there is no need to repeat them unless they are overridden or extended. In this case, the diagram shows inheritance correctly without redundant representation of inherited properties.
C: In Option C, the inherited properties name and address are explicitly marked as inherited. While it's possible to show inherited properties in this way for clarity, it's not necessary and is less common in standard UML class diagrams.
D: Statement D is incorrect because inherited properties can be shown in a specialized class, although it is not a requirement to do so for the properties to be inherited.
Based on the UML 2 Foundation specification, the correct way to depict inheritance without redundantly listing inherited attributes is shown inOption B.

by Henry at Apr 06, 2025, 12:18 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

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.

0
0
0
10