Class diagrams

Class diagrams are fundamental to the object modeling process and model the static structure of a system.

The Unified Modeling Language (UML) enables you to describe complex systems, which you can view from a number of perspectives through diagrams. In the UML, class diagrams are one of six types of structural diagram. Depending on the complexity of a system, you can use a single class diagram to model the entire system, or you can use several class diagrams to model the components of the system.

Class diagrams are the blueprints of your system or subsystem. Use class diagrams to model the building blocks (or objects) that make up the system, to display the relationships between the objects, and to describe what those objects can do and the services they can provide.

Class diagrams are useful in many stages of system design. In the analysis stage, a class diagram can help you to understand the requirements of your problem domain and to identify its components. In an object-oriented software project, the class diagrams that you create during the early stages of the project contain classes that often translate into actual software classes and objects when you begin to write code. Later on, you can refine your earlier analysis and conceptual models into class diagrams that show the specific parts of your system, user interfaces, logical implementations, and so on. Your class diagrams then become a snapshot that describes exactly how your system works, the relationships between system components at many levels, and how you plan to implement those components.

Relationships in class diagrams show the interaction between classes and classifiers. Such relationships indicate the classifiers that are associated with each other, those that are generalizations and realizations, and those that have dependencies on other classes and classifiers.

Use class diagrams to visualize, specify, and document structural features in your models. For example, during the analysis and design phases of the development cycle, you can create class diagrams to perform the following functions:

During the implementation phase of a software development cycle, you can use class diagrams to convert your models into code and to convert your code into models.

Related tasks
Modeling static structure by using class diagrams

Terms of use | Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.