A UML class diagram documents class design by showing a class name and, optionally, its instance variables and methods. Method signatures can include parameter and return-value datatypes. section 4.3
Choose the diagram’s detail level for its design purpose:
- Use a class name alone for a high-level view. section 4.3
- Add instance variables and methods for progressively more detailed documentation. section 4.3
- Mark intended visibility with + for public and − for private members; omit constructors, destructors, and unimportant accessors when appropriate. section 4.3
- Show relationships between classes to clarify how their objects interact at run time. section 4.7
Figure 4.2 Possible UML class diagrams for class Catalogue that include different amounts of information. A plus sign (+) indicates what is intended to be public, and a minus sign (-) indicates what is intended to be private. How much information to include in a class diagram depends on whether the diagram is in high-level or low-level design documentation of the application.
Compare four levels of information in a Catalogue class diagram, from the class name alone to members and methods. section 4.3


