Exam4Training

Which of the following diagrams contains an equivalent definition of System?

A structured class called System has two parts called Subsystem 1 and Subsystem2 respectively, as shown in the class diagram fragment below:

Which of the following diagrams contains an equivalent definition of System?

A)

B)

C)

D)

A . Option
B . Option
C . Option
D . Option

Answer: C

Explanation:

In UML 2, a structured class can have internal parts, which are depicted using ‘parts’ or ‘roles’ within the class diagram. These internal parts are used to show the composition of the class in terms of contained classes or components. In the context of the question, the structured class named ‘System’ contains two parts named ‘Subsystem1’ and ‘Subsystem2’.

Option C is the equivalent definition of ‘System’ in terms of UML 2 notation for several reasons:

It represents the structured class ‘System’ with internal parts correctly labeled as ‘s1:Subsystem1’ and ‘s2:Subsystem2-[ ]’, which indicates the role names ‘s1’ and ‘s2’ followed by the class type ‘Subsystem1’ and ‘Subsystem2’ respectively. The notation ‘1..*’ after ‘s2:Subsystem2-[ ]’ suggests a multiplicity, meaning that there can be one or many instances of ‘Subsystem2’ associated with

‘System’.

The compartmentalization within the structured class is indicative of the composition of the ‘System’, showing that ‘Subsystem1’ and ‘Subsystem2’ are integral parts of the ‘System’.

The notation conforms to the standard UML 2 representation for composite structures, as described in the UML 2 Superstructure Specification, where a class can be broken down into its constituent parts within the class rectangle.

This information is verified against the UML 2 Superstructure Specification, which is the authoritative source for UML notation and semantics. Particularly, this aligns with section 9.3.5 on Composite Structures Diagrams, which details the graphical notation for parts and roles within a structured class.

Exit mobile version