10-7-2010 - 9.5 10.3 How does polymorphism enable you to...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: 9.5 10.3 How does polymorphism enable you to program “in the general” rather than “in the specific”? Discuss the key advantages of programming “in the general.” ~Polymorphism enables the programmer to concentrate on the common operations that are applied to objects of all the classes in a hierarchy. The general processing capabilities can be separated from any code that is specific to each class. Those general portions of the code can accommodate new classes without modification. In some polymorphic applications, only the code that creates the objects needs to be modified to extend the system with new classes. 10.4 What are abstract methods? Describe the circumstances in which an abstract method would be appropriate. ~An abstract method is one with keyword abstract in its declaration. Abstract methods do not provide implementations. Each concrete subclass of an abstract superclass must provide concrete implementations of the superclass’s abstract methods. An abstract method is appropriate when it does implementations of the superclass’s abstract methods....
View Full Document

This note was uploaded on 02/15/2011 for the course CS 119 taught by Professor Jackson during the Fall '10 term at Jackson State.

Page1 / 2

10-7-2010 - 9.5 10.3 How does polymorphism enable you to...

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