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();
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.
@@rosalinamacarita01 If you like programming, you should learn it even if you don't become a professional. It is just a useful skill in many fields. Basically any STEM field. Are you doing so many activities you have to priorize time? If the answer is no, and you like programming, just go for it.
Многие пишут что это наследование, а не полиморфизм, на самом деле тут не много ошибся автор ему нужно было показать что класс vehicle работает одинаково как с кошкой, так и с собакой, попугаем или зайчиком, то есть каждый класс унаследовавший класс vehicle будет издовать vroom vroom
Python’s mixed with JavaScript, JavaScript with Java, and back; code wise it’s polymorphism (in many-forms) mixed up with inheritance. Although, the cat actually sounds like a motor bike - so +1up then. Anyhow, I hereby label this video productions intention as clickbait, collecting extra algorithmic boosts by comments like this one, while monetizing us poor developers with attention grabbing videos, we otherwise wouldn’t have seen, of fun cats. Realizing that’s about it… and… suddenly questioning if that is what the whole of media seem to intend.. Realizing I prefer being tricked by fun cat videos, of the more obvious kind. Hmm. So. Thanks for the opportunity to watch a fun cat.. and make an insight reflected in a comment like this very one 🎉😁
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();
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
This article I'm looking at says you can't do it with variables, is that true? Just functions?
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.
@@CodeVenture7while complete source is not open, it is still very obvious that acceleration is done the cat way.
@@Dunkable with OOP
inheritance in action
Catinhance?
This is inheritance, not polymorphism
I didn't even read the title I was so sure it would be correct 😭
Yes check the pinned comment
I dont know how i got to code+cat videos but i wanna stay here forever.
Best IT humor channel ever
"Yamaha FJR1300" ahh cat
Unironically explains inheritance better than some of my actual college programming classes
Really? You think this is a more clear explanation than a standard one?
@@Alkis05 I think it was a funny joke, but you are sooo autistic you missed it.
😂 You're right
High schooler here, is it worth going for programming?
@@rosalinamacarita01 If you like programming, you should learn it even if you don't become a professional. It is just a useful skill in many fields. Basically any STEM field.
Are you doing so many activities you have to priorize time? If the answer is no, and you like programming, just go for it.
Cat is stressed && waiting for revenge.
nice car
Jokes aside the cat is stressed out, one should never do such things to a cat
This is more an example of inheritance rather a polymorphism one. For the last it should have shown modifications like overrides in different classes.
Cool 😂
Very Fast Pickup 🛻🛻 😂😂😂😂
'I am car' ahh cat
It passed the duck test.
Sir you where going 40 in a 30 kitten zone
Cool
Change gear, engine started knocking .. 😑
That make my dog want to trap the cat 😂
i died 😂
What about (old Cat()).Brake()?
Que forma más gráfica de representarlo
Bro inherited the wrong class😂😂😂
My first thought was (new Cat()).accelerate();
Whats with the lag😂😂😂
I like this code have the tag python 🤦🤦🤦
Why not
@@เนื้อหมาอยู่ในจานits definitely not python
@@infrakazos so what? I have no clue about languages other than python, and this code looks totally understandable to me.
@@เนื้อหมาอยู่ในจาน its not python, so it shouldnt have python tag. just because you only know python and can recognise it doesnt mean it is python.
@@infrakazos I also can recognize that you are gay. Means your nickname should have a #gay tag, but it isn't there, so...
Car is ready!
Aeeeee bahi paap lagega, bata rah hu😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅
@@mr.jacker3951 😂
Class & console log??? 💀
javascript has classes tho-
@thefoxguy when's the last time that ever you've used js classes in production?
@@MohanrajM-m6x good point
@@MohanrajM-m6x Today, the Angular framework consists entirely of classes and decorators.
@@iriiv-k yeah, i forgot angular still uses class components & class structures, sorry my bad
Real 😂😂😂😂😂
now thats top engineering
Funny 😆
not bad!
Hello, my name is car
i love cars
JAJAJAJAJAJA entendi perfect ❤ pero en JAVA esto es Herencia
Our life consists of scripts😂
Lol😂
Is code kr ckakkr me java script vs code me run krvane lga 😂😂
Ayo
não acredito que entendi, já estou ficando preocupado
🤣🤣🤣🤣🤣
genius
Now i know why its car not cat
How cute 🥰🥺
Hurdle race ❤
Ninja cat 😺
When I type Cat instead of Car
please help me im watching a cat instead of bike 😂
Man the barket after console.log should be in the next line, it's feel me something wrong here 🙂
When did people start calling cars cats? Anyways, that engine sounds purrty
Tính đa hình trong lập trình hướng đối tượng
我需要這輛車
var cat {car}
MYTHICAL PROGRAMMING PULL
Cat is car, also bike.
Somebody tell lil bro what polymorphism is
What the 🤣🤣🤣🤣
More like cat extends car
U ARE WRONG. THE CAT WILL ACCELERATE ONBIRTH SINCE YOU CREATE IT AND IMIDEATLY ACCELERATE
car extend cat
Cateritance
Explains the 2:00 a.m. zoomies.
Cat extends Car
I hate people who don’t put the braces in separate lines
😂😂
Cat implements Car
Cat just inherited Vehicle, it didn't override the accelerate method so yeah this happens
Cat engine
Sir, this is a car not a motorcycle
That’s inheritance. Polymorphism is something different.
no,i think this is inheritance,not polymorphism
Многие пишут что это наследование, а не полиморфизм, на самом деле тут не много ошибся автор ему нужно было показать что класс vehicle работает одинаково как с кошкой, так и с собакой, попугаем или зайчиком, то есть каждый класс унаследовавший класс vehicle будет издовать vroom vroom
This is inheritance
My cats reacted to this video
Catwasaki
❤❤😢😅😂😂😂
Thats Inheritance
You have violated Liskov Substitution principal. Cat can never inherit Vehicle, its an invalid IS A.
I thought haxe programming but is not
Polymorpism is combination of overriding and dynamic dispatch. This code is incorrect.
You see that this code works, so it's not wrong
It can be wrong and still do something
@@happyducky9872 yes, but it should do vrum vrum, and it does it, so the code is right
😂😂😂
😂😂😂😂😂
😂
Inheritance
That’s my cat that I lost a few months ago tf are doing maybe just let him be
That's inheritance
Python’s mixed with JavaScript, JavaScript with Java, and back; code wise it’s polymorphism (in many-forms) mixed up with inheritance. Although, the cat actually sounds like a motor bike - so +1up then. Anyhow, I hereby label this video productions intention as clickbait, collecting extra algorithmic boosts by comments like this one, while monetizing us poor developers with attention grabbing videos, we otherwise wouldn’t have seen, of fun cats. Realizing that’s about it… and… suddenly questioning if that is what the whole of media seem to intend.. Realizing I prefer being tricked by fun cat videos, of the more obvious kind. Hmm. So. Thanks for the opportunity to watch a fun cat.. and make an insight reflected in a comment like this very one 🎉😁
😂😂😂😂😂😂😂😂😂😂😂
Where is the function with same name in child class otherwise its not polymorphism
Y herencia
Ah yes #python
Definitely not python but ok
@@anneonyme7383its the tags for the video. the video creator made that mistake. thats what this comment is pointing out
It's JavaScript
@@anneonyme7383He's talking about the fact the video creator put a python hashtag in the video title. Stop being a m0r0n.
Ah yes, console.log in Python
Ringo Danyan
class Cat extends Car {}
car
Motorcatsports
Translate this to c++, а то не понимаю
xml is not a proper language, damnit
Its a cat, not a toy
Xddd
Car
(new Cat()).accelerate();