Lesson 3
Lesson 3
Class Diagram
• 2 types of diagrams
– Structure Diagrams
• Provide a way for representing the data and
static relationships that are in an information
system
• Class diagram
– Behavior Diagrams
Structure Diagrams
• Class Diagram
– Describe the structure of the system in terms
of classes and objects
– Primary purpose during analysis workflow:
to create a vocabulary that is used by both
the analyst and users
What is a Class?
• Concrete
– Class from application domain
– Example: Customer class and Employee
class
• Abstract
– Useful abstractions
– Example: Person class
Attributes in a Class
Class Name
Attributes of Class
Operations/methods
of Class
Example of a Class Diagram
Provides
Patient Medical History
Association Relationship
+ primary insurance
carrier
Generalization Relationship
Person
Employee Customer
Manager Engineer
Generalization Relationship
Employee
hireDate
receivePay
performWork
Manager Engineer
department certifications
bonus
hireEmployee analyze
promoteEmployee design
Generalization Relationship
Person
Employee Contractor
Preferred Secondary
Manager Engineer
Contractor Contractor
Aggregation Relationship
1 provides 0..1
Patient Medical History
Multiplicity
1 provides 0..1
Patient Medical History
Multiplicity
• Redundant Classes
• Irrelevant Classes
• Vague Classes
• Attributes
• Operations
• Roles
• Implementation Constructs
Types of Classes