An Introduction to Object-Oriented Programming
By Timothy Budd
Study Guide for Chapter 20
After reading this chapter, you should be able to:
Explain the difference between describing a class as a type,
and describing a class as an object.
Explain how inheritance complicates the traditional view of types.
Understand the idea of class variables, as well as some of the problems
associated with the use of class variables.
Understand the idea of delegation, and be able to contrast this with
class-based object-oriented programming.
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.
What are the two broad ways of describing the idea of a class?
What are some of the ways in which types are used in programming languages?
How is the class, when viewed as a type, different from a record type?
How can overriding a method disrupt the process of verifying or
testing an algorithm?
How does the principle of substitutability interfeer with the
assignment of storage to object variables?
When classes are viewed as objects, what is the major responsibility
of the class object? What information must this object maintain in
order to perform this task?
What is a metaclass?
What problem is being solved by the introduction of the metaclass
What is a class variable (or class data field)?
Why is the initialization of a class variable a problem?
What is a delegate? How can the use of delegates support the sharing
Timothy Budd, 1995.