2 Comments
User's avatar
⭠ Return to thread
Poonam Chauhan's avatar

What distinguishes polymorphism through interface from abstraction

Expand full comment
RYMND's avatar

I think they are 2 sides of the same coin; for example i can have a function that can take documents and it will accept any class that is inherited from documents, and i have a new type of document called text, all i have to do is create a new class that inherits documents and implement the method body defined in the document class. Polymorphism is when i have new classes based off interface/abstraction because it is worded differently in some languages.

Expand full comment