Concepts of Programming Languages

(Sean Pound) #1

572 Chapter 12 Support for Object-Oriented Programming



  1. In what way do overriding methods in C# syntactically differ from their
    counterparts in C++?

  2. How can the parent version of an inherited method that is overridden in
    a subclass be called in that subclass in C#?

  3. Are all Ada 95 subclasses subtypes?

  4. How is a call to a subprogram in Ada 95 specified to be dynamically
    bound to a subprogram definition? When is this decision made?

  5. How does Ruby implement primitive types, such as those for integer and
    floating-point data?

  6. How are getter methods defined in a Ruby class?

  7. What access controls does Ruby support for instance variables?

  8. What access controls does Ruby support for methods?

  9. Are all Ruby subclasses subtypes?

  10. Does Ruby support multiple inheritance?


PROBLEM SET



  1. What important part of support for object-oriented programming is
    missing in SIMULA 67?

  2. In what ways can “compatible” be defined for the relationship between
    an overridden method and the overriding method?

  3. Compare the dynamic binding of C++ and Java.

  4. Compare the class entity access controls of C++ and Java.

  5. Compare the class entity access controls of C++ and Ada 95.

  6. Compare the multiple inheritance of C++ with that provided by inter-
    faces in Java.

  7. What is one programming situation where multiple inheritance has a
    significant advantage over interfaces?

  8. Explain the two problems with abstract data types that are ameliorated
    by inheritance.

  9. Describe the categories of changes that a subclass can make to its parent
    class.

  10. Explain one disadvantage of inheritance.

  11. Explain the advantages and disadvantages of having all values in a
    language be objects.

  12. What exactly does it mean for a subclass to have an is-a relationship with
    its parent class?

  13. Describe the issue of how closely the parameters of an overriding
    method must match those of the method it overrides.

Free download pdf