Lec05 System Modeling Part2
Lec05 System Modeling Part2
Lecture 2
Here we are also showing multiplicity: one object of type Patient is related to one object of type Patient Record
● The lower-level classes are subclasses inherit the attributes and operations
from their superclasses. These lower-level classes then add more specific
attributes and operations.
FlyingThin Animal
g
multiple
inheritance
A subclass may:
Add additional attributes, operations, relationships
Redefine inherited operations (use caution!)
GroundVehicle
owner Person
Superclass weigh
(parent) tlicenseNumbe 0..* 1
r
register( )
generalization
Association Name
Association
Role Names
Class University
Professor
Employee Employer
Relationships: Aggregation
Student Schedule
Aggregation
This is sometimes
called a ‘has_a’
relationship
Relationships: Composition
A form of aggregation with strong ownership and
coincident lifetimes
The parts cannot survive the whole/aggregate
Whole Part
Student Schedule
Aggregation
Association: Multiplicity and Navigation
Unspecified 1
Exactly one
Zero or more (many, unlimited) 0..*
*
One or more 1..*
Zero or one
Specified range 0..1
Multiple, disjoint ranges 2..4
2,
4..6
Example: What Gets Inherited
GroundVehicle
owner Person
Superclass weigh
(parent) tlicenseNumbe 0..* 1
r
register( )
generalization