Component Diagram vs Structure Composite Diagarm

Hi all

What is the difference between Component Diagram and Structure Composite Diagarm


Hi Safar,

Thanks for your post. According to “The Unified Modeling Language User Guide (second edition)” (written by Grady Booch, James Rumbaugh and Ivar Jacobson):

An component diagram shows the internal parts, connectors and ports that implement a component. When the component is instantiated, copies of its internal parts are also instantiated.

An composite structure diagram shows the internal structure of a class or a collaboration.

Hope this helps. If there is any inquiry, please feel free to ask.

Best regards,
Lilian Wong

Thanks for your answer to this question,
could you please explain by an example to distinguish the Component Diagram and Composite Structure Diagarm?


Hi Maziar,

Let’s take Car and Car Parts as an example.

A component diagram shows the components like car, wheel, and engine and their relationships - Car has a composition association Wheel and another composition association with Engine. The engine has an association with Wheel (since an engine drives the two front wheels). To specify that the engine is connected to the two front wheels, you will need to write OCL constraints.

A composite structure diagram shows the parts contained within another part and the links between these parts. The diagram would show the engine and the four wheels as separate blocks inside the car component. You can connect the engine with the two front wheels of the same car.

Best regards,
Jick Yeung

1 Like