Advertisements
Advertisements
प्रश्न
Define the following with an example each.
Polymorphism
व्याख्या
उत्तर
Polymorphism is the process of using a function for more than one purpose. It allows the use of different internal structures of the object by keeping the same external interface.
Example: Assume you have a smartphone to communicate. Communication mode: You can choose anything. It can be a call, text, photo, email, etc. So the purpose is the same, i.e. communication, but the approach is different. This is called polymorphism.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 1.01: Introduction to Object Oriented Programming Concepts - EXERCISES [पृष्ठ ९]