Class diagram icon Class Diagram
   

Class models describe the basic building blocks of object oriented systems and the relationship between them.

Class diagrams are the backbone of the UML, so you will find yourself using them quite often. The trouble with class diagrams is that they can be so rich; they will be overwhelming to use. Avoid overly complex models, monolithic designs and overloaded diagrams; use complementary models, views and diagrams to capture the information that is relevant to a particular development task.

A recommendation when starting to model is to not use all the notations available to you but start simple: classes, associations, attributes, generalization, and constraints. Strive for clarity and separation of concerns.

Class diagrams show the static structure of the model but you have to be careful and not focus exclusively on structure while ignoring behavior. A successful technique is to use some form of behavioral modeling, like state machine diagrams, in conjunction with class diagrams to comprehend the system under development.

A Unified Modeling Language diagram showing the classes within a flight reservation system