An Introduction to Object-Oriented Programming

By Timothy Budd

Study Guide for Chapter 11


Learning Objectives

After reading this chapter, you should be able to:

Study Questions

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.
  1. What is the difference between a subclass adding a method and a subclass overriding a method?

  2. What is the difference between replacement and refinement semantics? Why is the first often called American semantics, and the second Scandinavian semantics?

  3. What are some of the advantages of replacement semantics? What are some disadvantages?

  4. Why does replacement semantics conflict with the principle of substitutability?

  5. What are some of the ways that can be used to ensure that when a subclass replaces a method with another, the second performs in a similar fashion to the first?

  6. What are some of the advantages of refinement semantics? What are some disadvantages?

  7. How can refinement be simulated in a language that uses replacement semantics?


Contents copyright Timothy Budd, 1995.