Structuring a System with Classes
To structure your system, you will use classes. You can display the relationships between them in the class diagram. In order to create a snapshot of your system, you will use objects, their attributes and relationships.
Application Areas for Class Diagrams
You can use the class diagram to give a detailed representation of the structure of the system to be designed or mapped, its data (attributes) and its behavior (operations), as well as the relationships at this level.
The application of class diagrams crosses all project stages. Two fundamental areas of use should be mentioned:
- In conceptual-analytical modeling, the focus is on a higher degree of abstraction, with the priority being the concrete recording of discovered or planned coherences in order to represent the fundamental system elements and their relationships correctly and intelligibly.
- Logical, design-oriented modeling is used if the decision has been made about the technical realization and it is worthwhile drawing up more detailed information. In particular when the class diagrams are to be the basis for direct code creation, this must include all the required details such as data types, technical operations and the interfaces to be used.
You can edit the dependencies between the elements in the class diagram easily using special editors:
- The Dependencies tool window is used to maintain dependencies of the selected element independently of a diagram.
- The Dependency Editor is used for easily editing dependencies between various elements independently of a diagram.
Representing the System Structure in Detail
A class is an abstraction of a set of objects, which have the same structure, the same behavior, the same relationships and the same semantics. Identifying classes is an essential part of the technical analysis phase.
As a result of the analysis, a class contains the description and structure of objects which can be created using it (template for objects). It is defined by its attributes and operations, which are managed in corresponding sections of the class. A class can specialize one or more classes; it can be related to classes and other model elements via associations and dependency relationships.
The information required for technical implementation is produced and enhanced during the design phase.
In principle, classes are initially created with the stereotype specified in the create template. You can customize the stereotype later.
In the class diagram, you represent the static model of the classes with their properties (attributes) and behavior (operations) and specify the relationship of the classes to each other.
This chapter contains the topics:
