How does polymorphism enable you to program “in the general” rather than “in the specific”? Discuss the key advantages of programming “in the general.”

What will be an ideal response?


Polymorphism enables the programmer to concentrate on the common operations
that are applied to objects of all the classes below a particular base class 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.

Computer Science & Information Technology

You might also like to view...

What value does function mystery return when called with a value of 4?

int mystery (int number) { if (number <= 1) { return 1; } else { return number * mystery(number – 1); } } a. 0. b. 1. c. 4. d. 24.

Computer Science & Information Technology

A __________ is a term used to describe a select list that allows the user to select an option to load another web page.

a. navigation b. page header c. jump menu d. none of the above

Computer Science & Information Technology

When embedding an Access file, changes made to the Access source file are reflected in the Word document

Indicate whether the statement is true or false

Computer Science & Information Technology

When the default body or heading font in a document is changed, all new text in that document will use the new font

Indicate whether the statement is true or false

Computer Science & Information Technology