Elements of class diagrams, relationships between classes, class structure

Features create classes

The General structure of the class is shown in the figure above.

The need to pay special attention to:

  • All names (classes and attributes) are written without spaces. If you want to present in behalf of several words, the words are written together, each with a letter (a description of this style are given here).
  • Types that you can use, you can look at card types.

Recommendations for drawing class diagrams

There are recommendations for drawing a class diagram:

  • The direction of the relationship
  • Mechanics Association drawn “sideways”.
  • Decalogue songs are drawn down.
  • Inheritance is drawn up.
  • Naming context
  • The name of master usually the same as the class name.
  • Name detail (name, which will be a collection in the object model) is usually in the plural.
  • The Association must be called from the master, the type of composition - from both sides.
  • Communication parameters
  • Classes are United by Association with multiplicity “1:1” are combined into a single class.
  • Connection type Агрегация replaced either Ассоциацию or on Композицию.

features of using aggregation

  • If you have an aggregator of several detailov, the role of the aggregator can have the same names as names of objects of the other classes will refer to that object. The role of detail must have different names because these names are used to name properties wizard (the same property names are not valid).

  • Detail can act as a master. However, in this case, additional settings are required: