Object-Oriented Analysis and Design 02.UML and OO Fundamentals.4
Object-Oriented Analysis and Design 02.UML and OO Fundamentals.4
• Inheritance Usage
• Encapsulation
• Example of Encapsulation
• extends keyword
indicates inheritance.
• super() and super
keyword is used to refer
to the superclass.
• No need to define
getSpeed() method
because it’s inherited!
• setSpeed() method
overrides behavior of
setSpeed() in Airplane.
• Inheritance Usage
• Encapsulation
• Example of Encapsulation
• Reminder of Abstraction
• Association
• Roles
• Reminder of Abstraction
• Association
• Roles
• Self Association
• Self Association
• Whole-part
• Semantics of Aggregation
• Qualification
• Example of Qualification
• Whole-part
• Semantics of Aggregation
• Qualification
• Example of Qualification
• Interface
• Example of Interface
• Summary of Classes
• Sequence Diagram
• Interface
• Example of Interface
• Summary of Classes
• Sequence Diagram
• Overview of OO Fundamentals
• Delegation
• Delegation
• HAS-A
• More on inheritance
• IS-A
• More on polymorphism
• Message passing
• Polymorphic arguments and return types
• Interface
• Abstract class
• Object identity
Prof. Chun-Han Lin, CSIE, NTNU
42
Delegation (1/4)
• Overview of OO Fundamentals
• Delegation
• Delegation Summary
• Delegation Summary