This preview has intentionally blurred sections. Sign up to view the full version.View Full 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.
- Fall '10