Describe Polymorphism.

      

Describe Polymorphism.

  

Answers


Kavungya
The ability to take more than one form. It can also be defined as the ability to use the same syntax for objects of different types.
Example:
In some programming languages, the addition operation:
i) For two numbers generates a sum.
e.g.: 3 + 5 = 8,
ii) For two words generates a third string through concatenation of the wo
strings. e.g.:
Computer + Programming = ComputerProgramming
In OOP, polymorphism is used to describe variables which may refer at run time to objects of different classes. A single function can be used to handle different number and different types of arguments. The usage of a function to perform different types of tasks is referred to as overloading
Kavungya answered the question on May 15, 2019 at 15:14


Next: Define an interface.
Previous: Define Class Hierarchy.

View More Computer Programming Questions and Answers | Return to Questions Index


Exams With Marking Schemes

Related Questions