Sir, this explains inheritance Polymorphism: poly = many, morphism = forms If u override the 'accelerate' method then that is the best suitable example Example: class vehicle { accelerate(){ console.log("vroom vroom"); } } class Cat extends Vehicle { accelerate () { console.log(" meroom meroom"); } } (new Cat()).accelerate();
@CodeVenture722 сағат бұрын
Yeah I had to keep it short in the screen and I removed that afterwards for that but I stupidly forgot to change the caption text polymorphism
@Dunkable11 сағат бұрын
This article I'm looking at says you can't do it with variables, is that true? Just functions?
@einargs7 сағат бұрын
While this doesn't directly involve polymorphism, subtyping -- i.e. a child class being assignable the type of the parent class -- is a kind of polymorphism.
@pawesokoowski12945 сағат бұрын
@@CodeVenture7while complete source is not open, it is still very obvious that acceleration is done the cat way.
@Flutter-Pulse4 сағат бұрын
@@Dunkable with OOP
@cingizhemidov6990Күн бұрын
inheritance in action
@yuva...48 минут бұрын
❤❤😢😅😂😂😂
@lolidkstudio3 сағат бұрын
nice car
@Basit-23Күн бұрын
Real 😂😂😂😂😂
@justinliu778819 сағат бұрын
Ah yes #python
@AndriiIvanchovКүн бұрын
😂😂😂😂😂😂😂😂😂😂😂
@mrvoid109923 сағат бұрын
Polymorpism is combination of overriding and dynamic dispatch. This code is incorrect.