082267_lesson6

082267_lesson6 - CS 367 Programming Languages Lesson 6...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 367 Programming Languages Lesson 6 Problem Set Questions Chapter 12 1. Compare the dynamic binding of C++ and Java. In C++ methods and functions that must be dynamically bound have to be declared as virtual to allow dynamic binding. In Java, all method calls are dynamically bound unless the called method has been defined as final (which makes it static). 9. Explain one disadvantage of inheritance. A major disadvantage and difficulty is that the person modifying the original code must understand the section of required code, or all of it, in order to incorporate it into the new program. 11. What exactly does it mean for a subclass to have an is-a relationship with its parent class? An is-a relationship is when one class is a subclass of another class. For example, in the case of a car, the engine may be called a subclass of the car. 14. What is the primary reason why all Java objects have a common ancestor? Java’s common ancestor is “object” and it makes the language simpler through providing methods that
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/19/2011 for the course CS 367 taught by Professor Unkown during the Spring '09 term at Grantham.

Page1 / 2

082267_lesson6 - CS 367 Programming Languages Lesson 6...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online