Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

understanding class diagram

Can anyone explain what the connectors mean?

alt text
(source: stsmedia.net)

What freeware can generate a diagram like this?

like image 683
cometta Avatar asked Dec 04 '09 03:12

cometta


People also ask

How do you read a class diagram?

Class diagrams can be written from bottom to top, from left to right, or in any other orientation you'd like. Regardless of the orientation, the direction of the arrows define the meaning: Inheritance arrows always point at the superclass, and property arrows always point at the property class.

How does a class diagram work?

In software engineering, a class diagram in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the relationships among objects.

What is class diagram and example?

Class diagram describes the attributes and operations of a class and also the constraints imposed on the system. The class diagrams are widely used in the modeling of objectoriented systems because they are the only UML diagrams, which can be mapped directly with object-oriented languages.


2 Answers

The dashed (dotted) line is a dependency. It means that a class (source of the arrow) depends on another class (destination of the arrow). This is a very abstract kind of relationship, and is often annotated with further information in the form of stereotypes.

The diamond or rhombus means a whole/part relationship. In your example, a Transaction is made of Accounts. In UML, a white diamond is a weaker flavour of whole/part (aggregation), whereas a black diamond is a stronger variety, often called a composition. The semantics of these are poorly defined and have been shown to be flawed, though.

Triangles mean generalisation relationships. They mean that a collection of classes (sources of the triangle-pointed arrows) are specialisations of more generalised classes (destination of the triangle-pointed arrow). In your example, a Loan is a type of Product.

There are many tools that can draw structural or class diagrams. About free ones, have a look at Wikipedia here.

like image 58
CesarGon Avatar answered Oct 17 '22 16:10

CesarGon


UML has a standard, however not all people adhere to it. At wikipedia look up Class_diagram

Visio is the Microsoft Office software to create them, and a quick google search for Eclipse (Java) brings this http://www.mvmsoft.de/content/plugins/slime/index.htm

like image 2
Brett Allen Avatar answered Oct 17 '22 18:10

Brett Allen