Polymorphism 

Polimorphism is another important OOP concept Polymorphism. a Greek term, means the ability to take more than one form. An operation may exhibit different behaviours in different instances. The behaviour depends upon the types of data used in the operation. For example, 
consider the operation of addition. For two numbers, the operation will generate a sum. If the operands are strings. then the operation would produce a third string by concatenation. 
The process of making an operator to exhibit different behaviours in different instances is known as operator overloading

Polymorphism plays an important role in allowing objects having different internal 
structures to share the same external interface. This means that general class of operations may be accessed in the same manner even though specific actions associated with each operation may differ. Polymorphism is extensively used in implementing inheritance

Comments

Popular posts from this blog

Covid-19 Analysis and Visualization using Plotly Express

Artificial Intelligence (Problem Solving)

Linear Regression