educative.io

Educative

Did not see any difference from previous section

Child class defined it’s own get_area() function same as the previous section. I did not see there is any difference without the parent class.

Hi @Bo_Zhang ,

This is Waleed from Educative.

Yes, you are right about the behavior of the code but these are two different approaches used to implement polymorphism. The user may choose an approach depending on context of their project.

We hope Educative has inspired to further your learning.

Best Regards,
Waleed | Developer Advocate
educative.io