inheritence

Поделиться
HTML-код
  • Опубликовано: 18 янв 2025

Комментарии • 179

  • @dineshbh3837
    @dineshbh3837 21 день назад +928

    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();

    • @CodeVenture7
      @CodeVenture7  21 день назад +77

      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

    • @Dunkable
      @Dunkable 21 день назад +6

      This article I'm looking at says you can't do it with variables, is that true? Just functions?

    • @einargs
      @einargs 21 день назад +6

      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.

    • @pawesokoowski1294
      @pawesokoowski1294 21 день назад +5

      ​​@@CodeVenture7while complete source is not open, it is still very obvious that acceleration is done the cat way.

    • @Flutter-Pulse
      @Flutter-Pulse 21 день назад

      ​@@Dunkable with OOP

  • @cingizhemidov6990
    @cingizhemidov6990 22 дня назад +488

    inheritance in action

  • @v23452
    @v23452 20 дней назад +355

    This is inheritance, not polymorphism

    • @dank_shiv
      @dank_shiv 18 дней назад +1

      I didn't even read the title I was so sure it would be correct 😭

    • @CodeVenture7
      @CodeVenture7  13 дней назад +1

      Yes check the pinned comment

  • @BN3TRUNN3R
    @BN3TRUNN3R 17 дней назад +25

    I dont know how i got to code+cat videos but i wanna stay here forever.

  • @Abdullah-zd5rz
    @Abdullah-zd5rz 19 дней назад +19

    Best IT humor channel ever

  • @Skonp
    @Skonp 15 дней назад +7

    "Yamaha FJR1300" ahh cat

  • @starkeeper_youtube
    @starkeeper_youtube 16 дней назад +39

    Unironically explains inheritance better than some of my actual college programming classes

    • @Alkis05
      @Alkis05 15 дней назад +3

      Really? You think this is a more clear explanation than a standard one?

    • @llortaton2834
      @llortaton2834 10 дней назад

      @@Alkis05 I think it was a funny joke, but you are sooo autistic you missed it.

    • @sosis-s1k
      @sosis-s1k 9 дней назад

      😂 You're right

    • @rosalinamacarita01
      @rosalinamacarita01 3 дня назад

      High schooler here, is it worth going for programming?

    • @Alkis05
      @Alkis05 3 дня назад +1

      @@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.

  • @ІгорАлієв
    @ІгорАлієв 9 дней назад +2

    Cat is stressed && waiting for revenge.

  • @lolidkstudio
    @lolidkstudio 21 день назад +18

    nice car

  • @constantinerafikov
    @constantinerafikov 16 дней назад +2

    Jokes aside the cat is stressed out, one should never do such things to a cat

  • @Deimos4500
    @Deimos4500 18 дней назад +2

    This is more an example of inheritance rather a polymorphism one. For the last it should have shown modifications like overrides in different classes.

  • @rorumets
    @rorumets 14 дней назад

    Cool 😂

  • @irctckumar5045
    @irctckumar5045 7 дней назад +1

    Very Fast Pickup 🛻🛻 😂😂😂😂

  • @第2期ロシデレを楽しみです
    @第2期ロシデレを楽しみです 15 дней назад +1

    'I am car' ahh cat

  • @rishipahari
    @rishipahari 18 дней назад +1

    It passed the duck test.

  • @L0S7S0UL
    @L0S7S0UL 10 дней назад +3

    Sir you where going 40 in a 30 kitten zone

  • @Lowkeychilldroid
    @Lowkeychilldroid 5 дней назад

    Cool

  • @007Saad007
    @007Saad007 18 дней назад +4

    Change gear, engine started knocking .. 😑

  • @yep_9873
    @yep_9873 18 дней назад +3

    That make my dog want to trap the cat 😂

  • @karpuzkafa1
    @karpuzkafa1 День назад

    i died 😂

  • @marufahmad4385
    @marufahmad4385 19 дней назад +3

    What about (old Cat()).Brake()?

  • @patriciomoraga459
    @patriciomoraga459 7 дней назад

    Que forma más gráfica de representarlo

  • @m.ytechs
    @m.ytechs 15 дней назад

    Bro inherited the wrong class😂😂😂

  • @Stone_624
    @Stone_624 18 дней назад +5

    My first thought was (new Cat()).accelerate();

  • @fillixkid3005
    @fillixkid3005 17 дней назад +1

    Whats with the lag😂😂😂

  • @lefteriszacharoullas6941
    @lefteriszacharoullas6941 19 дней назад +6

    I like this code have the tag python 🤦🤦🤦

  • @temong0long054
    @temong0long054 7 дней назад

    Car is ready!

  • @mr.jacker3951
    @mr.jacker3951 17 дней назад

    Aeeeee bahi paap lagega, bata rah hu😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅😅

  • @MohanrajM-m6x
    @MohanrajM-m6x 18 дней назад +29

    Class & console log??? 💀

    • @thefoxguy
      @thefoxguy 18 дней назад +15

      javascript has classes tho-

    • @MohanrajM-m6x
      @MohanrajM-m6x 18 дней назад +7

      @thefoxguy when's the last time that ever you've used js classes in production?

    • @thefoxguy
      @thefoxguy 18 дней назад +6

      @@MohanrajM-m6x good point

    • @iriiv-k
      @iriiv-k 18 дней назад +2

      @@MohanrajM-m6x Today, the Angular framework consists entirely of classes and decorators.

    • @MohanrajM-m6x
      @MohanrajM-m6x 18 дней назад

      @@iriiv-k yeah, i forgot angular still uses class components & class structures, sorry my bad

  • @Basit-23
    @Basit-23 22 дня назад +7

    Real 😂😂😂😂😂

  • @BrownOrion-z1f
    @BrownOrion-z1f 15 дней назад

    now thats top engineering

  • @Fatali.Fataliyev
    @Fatali.Fataliyev 17 дней назад

    Funny 😆

  • @joneyabraham.s4183
    @joneyabraham.s4183 16 дней назад

    not bad!

  • @МихаилТретьяков-к3э
    @МихаилТретьяков-к3э 19 дней назад +2

    Hello, my name is car

  • @iexist_nt
    @iexist_nt 17 дней назад +1

    i love cars

  • @programming_code9923
    @programming_code9923 8 дней назад

    JAJAJAJAJAJA entendi perfect ❤ pero en JAVA esto es Herencia

  • @АртёмКутас-з8о
    @АртёмКутас-з8о 17 дней назад

    Our life consists of scripts😂

  • @RTBOSS
    @RTBOSS 16 дней назад

    Lol😂

  • @PawanPrajapati-g5m
    @PawanPrajapati-g5m 14 дней назад

    Is code kr ckakkr me java script vs code me run krvane lga 😂😂

  • @AndersonSantos-kb9kw
    @AndersonSantos-kb9kw 7 дней назад

    não acredito que entendi, já estou ficando preocupado

  • @kumarbanavathu7716
    @kumarbanavathu7716 10 дней назад

    🤣🤣🤣🤣🤣

  • @davejackson88
    @davejackson88 17 дней назад

    genius

  • @proboiz_50
    @proboiz_50 18 дней назад

    Now i know why its car not cat

  • @SayedNowshad-ri7rc
    @SayedNowshad-ri7rc 18 дней назад

    How cute 🥰🥺

  • @shaurabhsingh-e5x
    @shaurabhsingh-e5x 17 дней назад

    Hurdle race ❤

  • @skyrctechie
    @skyrctechie 20 дней назад +4

    Ninja cat 😺

  • @Eternal_Edge69
    @Eternal_Edge69 10 дней назад

    When I type Cat instead of Car

  • @abrarjahintokki7172
    @abrarjahintokki7172 15 дней назад

    please help me im watching a cat instead of bike 😂

  • @مرحبا
    @مرحبا 8 дней назад

    Man the barket after console.log should be in the next line, it's feel me something wrong here 🙂

  • @baileyajo
    @baileyajo 7 дней назад

    When did people start calling cars cats? Anyways, that engine sounds purrty

  • @LêĐức-c3g
    @LêĐức-c3g 15 дней назад

    Tính đa hình trong lập trình hướng đối tượng

  • @Swatou
    @Swatou 18 дней назад +1

    我需要這輛車

  • @GabFerndz
    @GabFerndz 11 дней назад

    var cat {car}

  • @bas777ien
    @bas777ien 10 дней назад

    MYTHICAL PROGRAMMING PULL

  • @player_3
    @player_3 19 дней назад +1

    Cat is car, also bike.

  • @damntrain5145
    @damntrain5145 17 дней назад +1

    Somebody tell lil bro what polymorphism is

  • @adebayoglover
    @adebayoglover 17 дней назад

    What the 🤣🤣🤣🤣

  • @shakystability3040
    @shakystability3040 17 дней назад

    More like cat extends car

  • @VitTrully
    @VitTrully 9 дней назад +1

    U ARE WRONG. THE CAT WILL ACCELERATE ONBIRTH SINCE YOU CREATE IT AND IMIDEATLY ACCELERATE

  • @ilyasakinqiyas9447
    @ilyasakinqiyas9447 19 дней назад +1

    car extend cat

  • @harshsonar9346
    @harshsonar9346 16 дней назад

    Cateritance

  • @JohnKerbaugh
    @JohnKerbaugh 19 дней назад +1

    Explains the 2:00 a.m. zoomies.

  • @mayankbhaisora2699
    @mayankbhaisora2699 16 дней назад

    Cat extends Car

  • @Mikumikku
    @Mikumikku 17 дней назад

    I hate people who don’t put the braces in separate lines

  • @bogdanivchenko3723
    @bogdanivchenko3723 16 дней назад

    Cat implements Car

  • @hoangvuminh6436
    @hoangvuminh6436 18 дней назад

    Cat just inherited Vehicle, it didn't override the accelerate method so yeah this happens

  • @BurnerAccount101-ui4et
    @BurnerAccount101-ui4et 20 дней назад +5

    Cat engine

  • @glooop139
    @glooop139 17 дней назад

    Sir, this is a car not a motorcycle

  • @todorpopov8613
    @todorpopov8613 15 дней назад

    That’s inheritance. Polymorphism is something different.

  • @linhbui4798
    @linhbui4798 8 дней назад

    no,i think this is inheritance,not polymorphism

  • @lol_hp
    @lol_hp 8 дней назад

    Многие пишут что это наследование, а не полиморфизм, на самом деле тут не много ошибся автор ему нужно было показать что класс vehicle работает одинаково как с кошкой, так и с собакой, попугаем или зайчиком, то есть каждый класс унаследовавший класс vehicle будет издовать vroom vroom

  • @darsandevs316
    @darsandevs316 18 дней назад

    This is inheritance

  • @megal_dev
    @megal_dev 17 дней назад

    My cats reacted to this video

  • @dudscoconut
    @dudscoconut 19 дней назад +1

    Catwasaki

  • @yuva...
    @yuva... 20 дней назад +1

    ❤❤😢😅😂😂😂

  • @Saixah
    @Saixah 2 дня назад

    Thats Inheritance

  • @PhoenixRisingFromAshes471
    @PhoenixRisingFromAshes471 11 дней назад

    You have violated Liskov Substitution principal. Cat can never inherit Vehicle, its an invalid IS A.

  • @OfficialDubEnderDragon
    @OfficialDubEnderDragon 16 дней назад

    I thought haxe programming but is not

  • @mrvoid1099
    @mrvoid1099 21 день назад +1

    Polymorpism is combination of overriding and dynamic dispatch. This code is incorrect.

    • @raphaeloberhummer5071
      @raphaeloberhummer5071 20 дней назад

      You see that this code works, so it's not wrong

    • @happyducky9872
      @happyducky9872 20 дней назад

      It can be wrong and still do something

    • @raphaeloberhummer5071
      @raphaeloberhummer5071 20 дней назад +1

      @@happyducky9872 yes, but it should do vrum vrum, and it does it, so the code is right

  • @princecassandreloicbakalab7893
    @princecassandreloicbakalab7893 21 день назад +1

    😂😂😂

  • @lesdeuxpalmesgarage1011
    @lesdeuxpalmesgarage1011 22 дня назад +1

    😂😂😂😂😂

  • @zbpsplay6673
    @zbpsplay6673 19 дней назад

    😂

  • @dhritimnsaikia6316
    @dhritimnsaikia6316 14 дней назад

    Inheritance

  • @MK69-us
    @MK69-us 9 дней назад

    That’s my cat that I lost a few months ago tf are doing maybe just let him be

  • @Vidgital7669
    @Vidgital7669 17 дней назад

    That's inheritance

  • @kilianlindberg
    @kilianlindberg 18 дней назад

    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 🎉😁

  • @AndriiIvanchov
    @AndriiIvanchov 22 дня назад +2

    😂😂😂😂😂😂😂😂😂😂😂

  • @gamezone43
    @gamezone43 18 дней назад

    Where is the function with same name in child class otherwise its not polymorphism

  • @fran201Dev
    @fran201Dev 15 дней назад

    Y herencia

  • @justinliu7788
    @justinliu7788 21 день назад +10

    Ah yes #python

    • @anneonyme7383
      @anneonyme7383 20 дней назад +3

      Definitely not python but ok

    • @trinityy-7
      @trinityy-7 20 дней назад

      @@anneonyme7383its the tags for the video. the video creator made that mistake. thats what this comment is pointing out

    • @expensiveexpensive8886
      @expensiveexpensive8886 20 дней назад

      It's JavaScript

    • @netanelkomm5636
      @netanelkomm5636 20 дней назад

      @@anneonyme7383He's talking about the fact the video creator put a python hashtag in the video title. Stop being a m0r0n.

    • @captive8670
      @captive8670 20 дней назад +3

      Ah yes, console.log in Python

  • @observerI
    @observerI 19 дней назад

    Ringo Danyan

  • @enriquegarciagalvan6046
    @enriquegarciagalvan6046 14 дней назад

    class Cat extends Car {}

  • @stysan
    @stysan 18 дней назад

    car

  • @benjaminsteigerwald5508
    @benjaminsteigerwald5508 19 дней назад

    Motorcatsports

  • @stevestevov2224
    @stevestevov2224 8 дней назад

    Translate this to c++, а то не понимаю

  • @mursuhillo242
    @mursuhillo242 16 дней назад

    xml is not a proper language, damnit

  • @HuTaoEdgy
    @HuTaoEdgy 16 дней назад +1

    Its a cat, not a toy

  • @MachineCodes
    @MachineCodes 15 дней назад

    Xddd

  • @xtreepvps
    @xtreepvps 19 дней назад

    Car

  • @lIllIIllIllIIlIl
    @lIllIIllIllIIlIl 22 дня назад +5

    (new Cat()).accelerate();