Here are all the actual test exam dumps for IT exams. Most people prepare for the actual exams with our test dumps to pass their exams. So it's critical to choose and actual test pdf to succeed.

Exam OMG-OCUP2-FOUND100 Topic 1 Question 24 Discussion

Actual exam question for OMG's OMG-OCUP2-FOUND100 exam
Question #: 24
Topic #: 1
Choose the correct answer:
Consider the following model

Where is v visible?

Suggested Answer: C Vote an answer

In UML, visibility of an attribute is determined by the scope of the classifier it belongs to and its visibility markers. The attribute 'v' is marked with a '-' sign, indicating it is private. Being private, it would normally be visible only within the class it is defined in, which is 'S' in this case. However, since 'T' is a subclass of 'S' (as indicated by the generalization relationship, a line with a closed, unfilled arrowhead), it inherits the attribute
'v'. Therefore, 'v' is visible in both 'S' and 'T'.
Option A is incorrect because it does not consider inheritance. Option B is incorrect for the same reason.
Option D is incorrect because a private attribute in a class is not visible to the entire package, only to the class itself and its subclasses.
The UML 2.5 specification states that a private member is only accessible within the namespace it is defined (section 7.5.3). Since 'T' is within the namespace of 'S' due to inheritance, 'v' is visible in both.

by Ziv at May 22, 2025, 05:06 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.