Building a UML Class Diagram

Now that you have built up your understanding of classes, look again at how class designs can be communicated to other developers. As discussed in Chapter 1, "Object-Oriented Programming," class diagrams are the UML mechanism for identifying class fields and methods and depicting associations between classes. The first step in building a class diagram is to identify the relevant classes and their inheritance relationships. Field and method declarations can be included in the diagram if that level of detail is needed to support the information you are trying to convey. Perhaps the most useful information, however, is that conveying the associations and relationships between classes.

Figure 7.1 depicts a class diagram ...

Get Special Edition Using Java 2 Standard Edition 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.