UML Class Diagrams – Relationship Types
CourseSectionOffering
‐CourseGroup ‐Section ‐Semester ‐Year
Student
‐StudentID ‐FirstName ‐LastName ‐EmailAddress
Car
‐VehicleID ‐Color ‐DateBuilt
Wheel
‐PartNumber ‐Size
1
0..1 0..*
*
Aggregation – each class can exist separately (HAS‐A, optional)
Composition – first class can exist independently, but second class can only exist in relationship to first class (HAS‐A, mandatory)
Generalization, Inheritance – the second class extends the first class (IS‐A, inheritance)
Generalization, interface realization – the right‐side class implements/realizes the left‐side interface (IS‐A, interface)
Association – one class uses or communicates with another class for processing (USES‐A)
Employee
‐EmpID
‐EmpName ‐EmpAddress ‐EmpNumDependents
FullTimeEmployee
‐Salary
QuickSort
‐localData
«interface»
Sort Method
Main
Central Controller