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.
Explain Class Diagrams
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.
An Aggregation connector is a type of association that shows that an element contains or is composed of other elements.
Drawn from the specific classifier to a general classifier, the Inheritance implication is that the source inherits the target’s characteristics.
A Composite aggregation is used to depict an element that is made up of smaller components.
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.