UML Distilled: A Brief Guide to the Standard Object Modeling Language, Second Edition
by Martin Fowler, Kendall Scott
Visibility
I must confess to having some trepidation about this section.
Visibility is one of those subjects that is simple in principle but has complex subtleties. The simple idea is that any class has public and private elements. Public elements can be used by any other class; private elements can be used only by the owning class. However, each language makes its own rules. Although many languages use terms such as "public," "private," and "protected," they mean different things in different languages. These differences are small, but they lead to confusion, especially for those of us who use more than one language.
The UML tries to address this without getting into a horrible tangle. Essentially, within the UML, you can tag any attribute or ...
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