5.8. Class Diagrams

The purpose of a class diagram is to visually and simply represent the important aspects of your classes in a compact manner. The diagram of a class has three main parts: the class name, the attributes, and the methods. It also includes the visibility modifiers and, sometimes, datatypes.

Note

A constructor is a special method that is called when you create an instance of a class using the new keyword. Since a constructor is a method, include it as such 0in your class diagram.

Let's create the Employee class for our WWWBooks case study with Visio. To create a class diagram in Visio, choose File > New > Software > UML Model Diagram. This opens a new blank drawing along with a special tool bar that has many different components. ...

Get Java™ for ColdFusion® Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.