[first slide]

Introduction to Object Oriented Programming

Timothy A. Budd

Chapter 12

Implications of Inheritance

Outline

  1. Idealization of is-a Relationship
  2. Memory Allocation - Stack and Heap Based
  3. Specific Example of Problem
  4. Memory Strategies
    1. Minimum Static Space Allocation
      1. Assigning a Larger Value to a Smaller Box
      2. The Slicing Problem
      3. Rules for Member Function Binding
      4. Illustration
    2. Maximum Static Space Allocation
    3. Dynamic Memory Allocation
      1. Copy Semantics versus Pointer Semantics
      2. Problems with Pointer Semantics
  5. Equality Testing
    1. Changing Method Arguments
    2. Covariance and Contravariance
  6. Type Conversion - Reverse Polymorphism
    1. Two Issues in Reverse Polymorphism
    2. Unsafe Reverse Polymorphism in C++
    3. A Better Solution
    4. RTTI
    5. Type Conversion in Java

Other Material

Intro OOP, Chapter 12, Slide 1