OOPortal OOPortal


User Defined Types  «Prev 

Class diagram

x and y are Floating Point Variables, or in Java can be declared as double.

  1. A class diagram is divided into compartments. The name of the class appears in bold type in the top or name compartment.
  2. The attributes of the class, that is, the values the class, are given in the bottom compartment, the attributes compartment.

UML Distilled

Class Diagram

The class diagram is not only widely used but also subject to the greatest range of modeling concepts. Although the basic elements are needed by everyone, the advanced concepts are used less often.
A class diagram describes the types of objects in the system and the various kinds of static relationships that exist among them. Class diagrams also show the properties and operations of a class and the constraints that apply to the way objects are connected. The UML uses the term feature as a general term that covers properties and operations of a class. Figure 5-3 shows a simple class model that would not surprise anyone who has worked with order processing. The boxes in the diagram are classes, which are divided into three compartments: the name of the class (in bold), its attributes, and its operations. Figure 5-3 also shows two kinds of relationships between classes: associations and generalizations.

Figure 5-3 : A simple Class Diagram