l5-s1 class diagrams 2003 sjsu -- cmpe software patterns dr. m.e. fayad, professor computer...
Post on 21-Dec-2015
225 views
TRANSCRIPT
2003 SJSU -- CmpE L5-S1 Class Diagrams
Software Patterns
Dr. M.E. Fayad, Professor
Computer Engineering Department, Room #283I
College of Engineering
San José State University
One Washington Square
San José, CA 95192-0180
http://www.engr.sjsu.edu/~fayad
2003 SJSU – CmpE --- M.E. Fayad L5-S3 Class Diagrams
Lesson Objectives
Objectives
3
Understand How to put together a class diagram Explore sample of classes and relationships Explore classes and association’s notation Understand the guidelines for putting together a class diagram
2003 SJSU – CmpE --- M.E. Fayad L5-S4 Class Diagrams
The most common diagram found in
modeling object-oriented system
Model the static design view of a system
The foundation for
– component diagrams
– deployment diagrams
4
Class Diagrams (1)
2003 SJSU – CmpE --- M.E. Fayad L5-S5 Class Diagrams
Class diagrams commonly contain the
following– classes
– interfaces
– collaborations
– dependency, generalization, and association relationship
– notes and constraints 5
Class Diagrams (2)
2003 SJSU – CmpE --- M.E. Fayad L5-S6 Class Diagrams
Captures the vocabulary of a system
Built and refined throughout development
Purpose– To model the vocabulary of a system
– To model simple collaborations
– To model a logical database scheme
6
Class Diagram
2003 SJSU – CmpE --- M.E. Fayad L5-S17 Class Diagrams
A well-structured class diagram– is focused on communicating one aspect of a
system’s static design view
– contains only elements that are essential to understanding that aspect
– provides detail consistent with its level of abstraction
– is not so minimalist that it misinforms the reader about important semantics
17
Guidelines
2003 SJSU – CmpE --- M.E. Fayad L5-S18 Class Diagrams
T/F
1. Multiplicity defines how many instances of one class can be associated with the instance of the other class.
2. Bi-directional - The fact that associations are read in both directions
3. Multiplicity is the number of associations of instances of each class.
4. Class diagrams model the dynamic design view of a system.
18
Discussion Questions