Class Diagram: Advanced Concepts - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

Class Diagram: Advanced Concepts

Description:

are those that can be calculated from other associations and attributes ... Immutability {immutable} vs. {read only} ex. Age (birthday) ... – PowerPoint PPT presentation

Number of Views:271
Avg rating:3.0/5.0
Slides: 26
Provided by: benz8
Category:

less

Transcript and Presenter's Notes

Title: Class Diagram: Advanced Concepts


1
Class Diagram Advanced Concepts
  • Yin-Hsong Hsu

2
Multiple Classification
  • Single classification vs. multiple classification
  • Multiple classification v.s multiple inheritance
  • complete
  • Useful for conceptual modeling

3
(No Transcript)
4
Dynamic Classification
  • Where an object may change its type?
  • Examples
  • a bank account
  • a persons job
  • Dynamic classification vs. static classification
  • Useful in conceptual modeling

5
(No Transcript)
6
Aggregation and Composition
  • Aggregation part-of relationship ?
  • Coad organization and clerk gt yes
  • Rumbaugh company and employees gt no
  • Composition in UML (stronger definition)
  • the part object are usually expected to live and
    die with the whole

7
(No Transcript)
8
Derivated Assocations and Attributes
  • are those that can be calculated from other
    associations and attributes respectively on a
    class diagram
  • Most critical on specification diagrams
  • For reminding on conceptual diagrams
  • For annotating fields that are used as caches on
    implementation diagrams

9
(No Transcript)
10
Interface and Abstract Classes
  • Interface vs. implementation
  • Abstract methods and classes
  • Generalization
  • Dependence

11
Windows Window
toFront( )
toBack( )
Window
X11 Window
abstract
Text Editor
toFront( )
toFront()
toBack( )
toBack()
Mac Window
myTextEditor
toFront( )
toBack( )
12
(No Transcript)
13
(No Transcript)
14
Reference Objects and Value Objects
  • Examples
  • Value objects should be immutable
  • association vs. attributes in UML
  • Collections for multi-valued roles
  • ordered, bag, ordered bag, hierarchy,
    dag
  • Immutability
  • immutable vs. read only ex. Age (birthday)
  • bear in mind that people may make mistakes

15
Classification and Generalization
  • is a relationship ??
  • Generation is transitive
  • Classification is not transitive

16
Qualified Associations
  • An example
  • In conceptual modeling
  • In specification modeling
  • For implementation

17
(No Transcript)
18
Association Class
  • An example

19
Another form of previous diagram
20
(No Transcript)
21
N-ary Association
  • An n-ary association is an association among
    three or more classifiers

22
Parameterized Class
  • Parameterized class in C (template)
  • a bound element, stereotype bind

Class Set ltTgt void insert (T
newElement) void remove(T newElement) ... S
et ltEmployeegt employeeSet
23
(No Transcript)
24
(No Transcript)
25
Visibility
  • C
  • public, private, protected
  • friend
  • Java
  • public, protected, package, private
  • Smalltalk
  • private (data), public (operations)
  • When you are using visibility, use the rules of
    the language of which you are working
Write a Comment
User Comments (0)
About PowerShow.com