A classifier can have any number of attributes or none at all. Attributes describe the structure and value of an instance of a class.
For example, one of the attributes that a "Customer" class has is a "balance" attribute that holds the amount of money in the customer's account.
In UML class diagrams, the following mappings exist:
Attributes are shown in the attribute compartment of a shape.
The following table shows attributes declared in source code and how they are illustrated in the Visualizer.
| C/C++ source code | UML visualization |
![]() |
![]() |
You can show, hide, or collapse the attribute compartment, and show or
hide the compartment title. You can also specify the visibility styles of
attributes as text symbols (such as "-") or icons (such as
).