I’m studying OOP at the moment, and I’ve got this thesis. Because I know that inheriting a subclass from a superclass be like: class superClass : subClass{ }
but I’m curious if this is an acceptable form: class superClass : subClass1 : subclass2
.
In a nutshell, I want to inherit a subclass from another one. Because what if I get into a problem like there is a subclass and it is inherited from a superclass because they have common data. Thats fine right?
But here is the catch: What if I need another subclass, which has common data with both of the first subclass and the super or main class?