Classes

Figure C.1 applies some of the UML features for illustrating classes. Following are notes on class diagrams.

Figure C.1. The fireworks package includes the Firework and Classification classes.

  • Indicate a package by placing the name of the package in a rectangle left-aligned with a larger box that may show classes and interfaces. Figure C.1 shows a portion of the com.oozinoz.fireworks package.

  • UML does not require that a diagram show everything about a portrayed element, such as the complete contents of a package or all the methods of a class.

  • Draw a class by placing the name of a class centered in a rectangle. Figure C.1 shows two classes: ...

Get Design Patterns Java™ Workbook 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.