CS 3304: Comparative Languages
Object-Oriented Programming
[
Course Documents
] : [
Object-Oriented Programming
]
Previous
Contents
Next
Keyword Index
Design Issue: Implementation and Interface Inheritance
Interface inheritance
: subclass can only see parent's interface
Adv.--preserves encapsulation
Disadv.--can result in inefficiencies
Implementation inheritance
: subclass can see both the interface and the implementation of parent
Disadv.--changes to the parent class require recompilation of subclasses, and sometimes even modification of subclasses
Disadv.--subclass can introduce errors in parent