UML Class Diagrams
The Class Element
Structure
- Attributes = variables, fields, parameters
- Operations = functions, methods
Visibility Notation
+
= public-
= private#
= protected
Relationships
Inheritance
<<Name>>
= an abstract class
Association
- How a class uses another
Aggregation
- Potential membership of one class to another
Composition
- Indicates that a class only exists as a member of another class
Multiplicity
1
= must be one3
= must be 3*
= any number2..*
= at least 21..5
= one to 5