Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Component - Subcomponent Relationship or Generalization Relationship? in Component Diagram UML

I'm under confuse with the Component - Subcomponent relationship and Generalization relationship between the components.

When do we need to mention two components as Component - Subcomponent relationship and when to mention them as Generalization relationship.

Can the Generalization relationship (Figure A) be mentioned as the Component - Subcomponent relationship (Figure B) within in Component Diagrams in all the time? (It is understandable that inverse is false)

Figure A :

enter image description here

Figure B :

enter image description here

like image 483
namalfernandolk Avatar asked Nov 27 '25 12:11

namalfernandolk


1 Answers

  • The notation in figure B is used to represent component realization relationship.

    www.omg.org/spec/UML/2.5/Beta2:

    11.6.3 Structured Classifiers → Components → Semantics

    ...A Component may be realized (or implemented) by a number of Classifiers. In that case, a Component owns a set of ComponentRealizations to these Classifiers.

    A component acts like a Package for all model elements that are involved in or related to its definition, which should be either owned or imported explicitly. Typically the Classifiers that realize a Component are owned by it...

  • You can use the generalization relationship (figure A) between components as usual because component is an UML classifier like any other class.

But figure A and figure B represent different things and figure B in your example is not ok

like image 58
xmojmr Avatar answered Nov 30 '25 04:11

xmojmr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!