Author Archives: Laura
Inheritance, in a nutshell, is exactly what it sounds like. There’s a “superclass”, which has all the basic functionality and attributes that everyone inheriting from it will have. There’s the inheritors, which will be able to obtain all the methods of their superclass simply by calling “super”. So basically when creating a superclass, you must always think that it has to be generic enough that many other classes can use it, and try to limit the things you put in it (attributes and methods) to things that will be shared by every other class.
Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live.