UML Distilled: A Brief Guide to the Standard Object Modeling Language, Second Edition
by Martin Fowler, Kendall Scott
Operations
Operations are the processes that a class knows to carry out.
Operations most obviously correspond to the methods on a class. At the specification level, operations correspond to public methods on a type. Normally, you don't show those operations that simply manipulate attributes, because they can usually be inferred. You may need to indicate, however, whether a given attribute is read-only or frozen (that is, its value never changes). In the implementation model, you may want to show private and protected operations, as well.
The full UML syntax for operations is
visibility name (parameter-list) : return-type-expression {property-string}
where
visibility is + (public), # (protected), or − (private)
name is a string
parameter-list contains ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access