UML Design Class Notation

Basic Class, Interface, and Abstract class

In Java operations are called methods, and attributes called fields

Interfaces typically only have public operation definitions. In later versions of Java you can have both fields and default methods in interfaces. This is quite special for Java and not part of basic object orientation.

Design Class Diagram Notation Crash Course

UML

Alternate notations for abstract classes is to have the class name in italics. This is, however, hard to see and esp. hard to write when doing sketches by hand, prefer to use the notation below.

Alternate notation for interfaces is the lollipop (aka. balls and socket) notation, you typically find these in component diagrams and sequence diagrams (when sending a message availabe through an interface).

Note the underline on static operations and static attributes (static attribute not shown in diagram).

UML Design Classes

Java Implementation