A component diagram in UML (Unified Modeling Language) is a type of structural diagram that shows the organization and relationships among software components in a system. It is often used to model the software architecture of a system and its interdependencies with external systems or modules.
Main components:
-
Components: Components are represented as rectangles with the name of the component inside. The relationships among components are represented by connectors or arrows that indicate the type of relationship.
-
Dependency: A dependency relationship indicates that one component depends on another component to function. It is shown as a dashed arrow pointing from the dependent component to the component it depends on.
-
Association: An association relationship indicates that two components are related in some way, such as through data or control flow. It is shown as a solid line connecting the two components.
-
Aggregation: An aggregation relationship indicates that one component contains or is composed of other components. It is shown as a diamond-shaped arrow pointing from the containing component to the contained components.
-
Composition: A composition relationship is similar to an aggregation relationship, but it indicates that the contained components are part of the containing component and cannot exist without it. It is shown as a diamond-shaped arrow with a filled-in head pointing from the containing component to the contained components.