Object Relationships
"Uses a"
An object uses another object by calling a public method of that object.
"Has a"
- Implemented using composition (aggregation)
- Graphically represented by an aggregation hierarchy
- Examples
- A course section has a student list
- A person has a birth date
- A movie has a start time
- A library has a book
- A Document has a Page
- A Page has a Line
- A Line has a string
"Is a"
- Implemented using inheritance
- Graphically represented by an inheritance hierarchy
- One object is a more specialized version of another:
- A car is a vehicle
- A sorted list is a list
- A student is a person
- A professor is a faculty member
- A lecturer is a faculty member