An Introduction to Object-Oriented Programming
By Timothy Budd
Study Guide for Chapter 12
After reading this chapter, you should be able to:
Describe how the principle of substitutability for object-oriented
languages conflicts with other programming language
features, such as memory management, assignment, and testing for equality.
Identify techniques used by various programming languages to overcome these
You may wish to use the print or save as command
on your web browser to produce a copy of this study guide.
That way you can fill in the answers to the questions as part of
your assimilating the information you learn as you read the material.
Explain why there is a conflict between the principle of substitutability,
and the compile-time allocation of memory to variables.
Briefy describe the three approaches described in the book that are
used to solve this problem.
What is the slicing problem? In languages that use the minimal space
allocation strategy, why does the programmer need to know that
slicing is taking place?
Why do programming languages, for the most part, not used the maximum
static space allocation technique?
What does it mean to say a programming language uses pointer semantics
for assignment? How might a programmer tell if his or her language
uses pointer semantics?
What is pointer equivalence?
What is a situation where one might want to say that two values
are equal when they are not identically equivalent in the pointer sense?
What is a cast? In what situations would one use a cast?
Timothy Budd, 1995.