Difficulty: Easy
Correct Answer: Correct
Explanation:
Introduction / Context:
Object diagrams (sometimes called instance diagrams) provide a snapshot of specific objects and their links at a moment in time. Reading their notation correctly helps teams reason about concrete examples of the design and verify multiplicities and constraints with real-looking instances.
Given Data / Assumptions:
Concept / Approach:
In UML, an object is typically drawn as a rectangle. The top compartment contains the underlined object name, optionally in the form instanceName:ClassName
, which makes clear both the specific instance and its type. A second compartment often lists attribute slots with their current values (for example, status = "Shipped"
). Additional compartments are not required; operations are usually not shown for instances. Therefore, representing an object with two compartments is a common and correct depiction, though the attribute compartment may be omitted if values are not relevant to the example.
Step-by-Step Solution:
name:Class
if desired.Add a second compartment listing attribute slots and values.Connect objects with links to represent associations.Conclude that the statement is correct for standard practice.
Verification / Alternative check:
Survey UML primers and tool defaults; they show object rectangles with underlined names and (optionally) a second compartment for slots, confirming this conventional representation.
Why Other Options Are Wrong:
Common Pitfalls:
Forgetting to underline the object name; omitting type information when it matters; stuffing methods into an object diagram (they belong to classes, not instances).
Final Answer:
Correct
Discussion & Comments