Beruflich Dokumente
Kultur Dokumente
Class Diagrams
• Basic Concepts
• Type/Class
• Attribute
• Association
• Association Role
• Multiplicity
• Navigability
• Association Class
• n-Ary Associations
• Generalization
Basic Concepts
Type/Class
• Notation(s)
Purchase Order
...
} Default attribute
compartment
...
} Default operation
compartment
Purchase Order
operations
...
responsibilities
...
exceptions
...
Type/Class (cont)
• Include each of the actors from the use cases on the class
diagram
- Suggestion: stereotype them as <<actor>>
Attribute
• Notation
Purchase Order
Date Ordered
Ship Via
Ship To
Status
Association
Phred 9E421
Clementine 6B
Rover A46
Homeboy D1091
Kermit 928A
5Y69
George
• Basic notation
Aardvark Burrow
Name Location
Weight Depth
Age
Number of Chambers
Sex
Association Role
• Notation
Aardvark Burrow
Name
Weight Domicile Location
Depth
Age Occupant Number of Chambers
Sex
Multiplicity
• Example
If I were an Aardvark, what is the minimum and
maximum number of Burrows I could live in?
If I were a Burrow, what is the minimum and
maximum number of Aardvarks that could live in
me?
• Notation
1 Many 1..*
[Flavin81]
Matt Flavin, Fundamental Concepts of Information Modeling, Yourdon Press, 1981
Multiplicity (cont)
Navigability
• Notation
Engine
Cylinders
Automobile 1 Horsepower
...
VIN 1
Body Type
Color
4 Tire
...
1 Tread Pattern
Mileage
...
Association Class
• Notation
Flight
Traveller
Flight Number
From City Code * * Name
Departure Time Address
To City Code Smoker?
Arrival Time
Reservation
Date
Class of Service
Status
...
n-Ary Associations
• Notation
Hospital Surgeon
Name Name
Address Phone Number
... Years Experience
At By
Procedure Patient
Name Name
Expected Duration Address
... On ...
Operation
Date
...
Generalization
• Notation
Employee
Name
SSN
Hire Date
Status
Generalization (cont)
Resident
... University Student
Name
ID Number
Local Address
Non-resident ...
Home State
Key Points