[first slide]
Introduction to Object Oriented Programming
Chapter 12
Implications of Inheritance
Outline
- Idealization of is-a Relationship
- Memory Allocation - Stack and Heap Based
- Specific Example of Problem
- Memory Strategies
- Minimum Static Space Allocation
- Assigning a Larger Value to a Smaller Box
- The Slicing Problem
- Rules for Member Function Binding
- Illustration
- Maximum Static Space Allocation
- Dynamic Memory Allocation
- Copy Semantics versus Pointer Semantics
- Problems with Pointer Semantics
- Equality Testing
- Changing Method Arguments
- Covariance and Contravariance
- Type Conversion - Reverse Polymorphism
- Two Issues in Reverse Polymorphism
- Unsafe Reverse Polymorphism in C++
- A Better Solution
- RTTI
- Type Conversion in Java
Other Material