understanding class diagram

cometta picture cometta · Dec 4, 2009 · Viewed 17.9k times · Source

Can anyone explain what the connectors mean?

alt text
(source: stsmedia.net)

What freeware can generate a diagram like this?

Answer

CesarGon picture CesarGon · Dec 4, 2009

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.