How do you use class inheritance | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do you use class inheritance

I don't know how to use class inheritance does anyone have any idea

29th May 2018, 6:26 AM
Thabang
1 Answer
+ 9
Think of inheritance as a subclass deriving some more general properties from a superclass. Animals:Mammals:Canine:Dogs:Terrier Now if you had to specify all the properties of the Terrier class from scratch, having many classes representing species --- maintaining that would be inefficient, if doable. That is what inheritance is for. Brush up your knowledge here, as well: https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2469/?ref=app
29th May 2018, 6:38 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar