Classes in UML
- Most
important building block of any OO system
- Naming
- Should
be named in the vocabulary of the problem domain
- Typically
singular noun starting with a capital letter
- Diagram
– Rectangle divided in to name, attributes, operations, and sometimes
responsibilities
- Public
– can be used by the class’s operations and by any one outside the class
- Protected
– can be used by the class’s operations and any derived class
- Private
– can be used by the class’s operations only

- Well
Structured Classes
- Provide
a crisp abstraction of an object in the problem domain
- Embody
a small, well-defined set of responsibilities
- Separate
specification and implementation
- Are
simple but extensible
- When
you draw a class in UML
- Show
only those properties that are important to understand the object in its
context
- Group
attributes by category
- Show
related classes in the same diagram
Class Diagram Example:
