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 30 Discussion

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

Choose the correct answer:

Consider the following class definition:

Which diagram fragment shows an instance of the Company class in which name has the value OMG?

A)

B)

C)

D)

E)

F)

Show Suggested Answer Hide Answer
Suggested Answer: D

To represent an instance of a class in a UML Object Diagram, the standard notation is to specify the instance name followed by a colon and the class name, and then list the attribute values within the compartment.

The class definition for Company specifies that there is one attribute, name, of type String.

An instance of Company where the name attribute has the value 'OMG' would be shown as follows:

InstanceName : ClassName attributeName = attributeValue

In the provided options, Option D correctly represents an instance of the Company class with the name attribute set to 'OMG'. The name of the instance is not specified, which is allowed in UML when the instance name is not important or is understood from the context.

Thus, the correct answer is:

D . Option D


Contribute your Thoughts:

Billi
18 days ago
I'm not sure, but I think Option D also shows the name as OMG.
upvoted 0 times
...
Eugene
19 days ago
I believe it's Option C because the name is OMG in that diagram.
upvoted 0 times
...
Herminia
19 days ago
Options B and C both look good, but I'm going to have to go with C. Can't go wrong with the 'OMG' name, am I right?
upvoted 0 times
...
Shannan
24 days ago
I'm so hungry, I could eat a whole company! But I digress, I think Option B is the correct answer here.
upvoted 0 times
...
Talia
25 days ago
Hmm, this is a tricky one. I'm torn between Options B and C, but I think I'll go with C just to be safe.
upvoted 0 times
Alyce
7 days ago
I think Option C is the correct answer.
upvoted 0 times
...
...
Ciara
28 days ago
I think the correct answer is Option B.
upvoted 0 times
...
Edison
1 months ago
I'm going with Option C. The object diagram shows the name field with the value 'OMG', which matches the question.
upvoted 0 times
Audry
16 days ago
I think Option C is correct too. The name 'OMG' is clearly visible in the diagram.
upvoted 0 times
...
Bong
24 days ago
I'm going with Option C. The object diagram shows the name field with the value 'OMG', which matches the question.
upvoted 0 times
...
...
Gladys
1 months ago
Option B looks good to me, the name property is clearly labeled 'OMG'.
upvoted 0 times
Talia
17 days ago
Let's go with Option B then.
upvoted 0 times
...
Jose
20 days ago
I agree, the name property is clearly labeled as 'OMG'.
upvoted 0 times
...
Edmond
23 days ago
I think Option B is the correct answer.
upvoted 0 times
...
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77