UML class diagrams connectors

Many of you consider building class diagrams is a bit complicated and they prefer to start immediately programming.

While this is might be true for almost developers, this post will help you to build class diagrams in the future. This post will explain how to  determine and implement the different class diagram relationships.

Association Aggregation
Inheritance Composition

Explain Class Diagrams

Association

An Association implies two model elements have a relationship, usually implemented as an instance variable in one Class. Association is the general relationship type between elements. When code is generated for Class Diagrams, Associations become instance variables in the target Class.

Aggregation

An Aggregation connector is a type of association that shows that an element contains or is composed of other elements.

Inheritance

Drawn from the specific classifier to a general classifier, the Inheritance implication is that the source inherits the target’s characteristics.

Composition

A Composite aggregation is used to depict an element that is made up of smaller components.

Composition

Conclusion

Class Diagram relationship are easy to understand. There are more connectors than the ones explained above. One rule that you should always follow, build class diagrams as simple as possible.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s