A class defines a group of objects that share the same structure, attributes, relationships, and behavior.
Each object represents one instance of that class. For example, Person can define a type, while Sally Brown represents one specific object of that type.
In a UML class diagram, a rectangle represents the class. The upper section contains its name. In addition, other sections may contain attributes and operations. Relationships connect it to other classes.
Teams usually name classes with clear singular nouns. For example, they use Person instead of Persons. Moreover, they avoid unnecessary synonyms because consistent terms improve the model.
Not every noun requires a separate model element. For example, Date of Birth usually represents an attribute of Person. In contrast, Vehicle may represent an independent domain entity.
A unique identifier distinguishes individual objects. Therefore, two objects can remain separate even when they share the same attribute values.
Classes help teams structure domain information, define common terms, and describe relationships between important entities.
« Back to Glossary Index
