Computer Science 3675
Fall 2002
Practice questions for quiz 5

Remark. Some of these questions refer to material that will be discussed on Thursday, Dec 2.

  1. Write a clearly legible T to the left of each of the following that is true, and a clearly legible F to the left of each that is false.

    1. Programs written in an object-oriented style tend to be organized significantly differently from programs written in a functional or procedural style.

    2. The class is an important concept of object-based programming.

    3. In most object-oriented languages, some type checking must be done at run time.

  2. In object-oriented programming, is a private variable of an object accessible only to that one object, or is it possible for other objects to access it directly?

  3. In a single-inheritance object-oriented language, is there a limit on the number of subclasses that a class can have?

  4. In object-oriented programming, you imagine that objects carry methods with them. Yet, the methods are not really stored with the objects. How does an object locate its methods? How does it know which methods to select? What is the name of the system support that is responsible for locating methods?

  5. Some object-oriented languages allow selection of methods to be done either statically or dynamically, depending on how the method is defined. What is the difference between static and dynamic selection?

  6. How does the mechanism for inheriting variables work in single-inheritance object-oriented languages? Is there a separate implementation of each selector for each class, or does one implementation of each selector work for all classes? How do the selector(s) work?

  7. What are the characteristics of a virtual method? What makes it virtual?

  8. What is an abstract class?