O'Reilly logo

Developing Enterprise Java Applications with J2EE™ and UML by Cary E. Umrysh, Khawar Zaman Ahmed

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Representing Structure

Structural concepts, such as class and interface, are fundamental to both Java and the UML. This section identifies how these concepts map to Java and the UML.

Class

In the UML, a Java class is represented via a compartmentalized rectangle. Three horizontal compartments are used:

  • Name compartment: Shows the Java class name

  • Attribute compartment: Lists variables defined on the class, if any

  • Operations compartment: Shows methods defined on the class, if any

Figure 4-1 shows a simple Java class without any variables and methods.

Figure 4-1. A class in Java and the UML

An abstract class is identified by italicizing the class name. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required