Replacing Multiple Inhertance with delegation
I was going through “Object Oriented Modelling and Design” by James Rumbaugh et al and it said that in languages where multiple inheritance is not supported like Java three mechanisms can be used as workarounds
Does multiple inheritance violate Single Responsibility Principle?
If you have a class which inherits from two distinct classes, does not this mean that your subclass automatically does (at least) 2 things, one from each superclass?
Proper workaround for multiple inheritence in Java (Android)
I have a conceptual problem with a proper implementation of code which seems require multiple inheritance, that would not be a problem in many OO languages, but as the project is for Android, there is no such thing like multiple extends
.
Can Objective C categories serve the same purpose as Traits do in Scala?
The statement of the question seems little abstract to me, so please read the details below.
How does C++ handle multiple inheritance with a shared common ancestor?
I’m not a C++ guy, but I’m forced to think about this. Why is multiple inheritance possible in C++, but not in C#? (I know of the diamond problem, but that’s not what I’m asking here). How does C++ resolve the ambiguity of identical method signatures inherited from multiple base classes? And why is the same design not incorporated into C#?
Python multiple inheritance or decorators for composable behaviours
I recently discovered (or rather realised how to use) Python’s multiple inheritance, and am afraid I’m now using it in cases where it’s not a good fit. I want to have some starting data source (NewsCacheDB
,TwitterStream
) that gets transformed in various ways (Vectorize
,SelectKBest
,SelectPercentile
).
Term for a Class with Multiple Interfaces
Say I have a class that implements multiple interfaces. I pass the same instance around using a different interface, depending on what the consumer is interested in.
Adding base-class (inherited) functionality to classes that you don’t control
I have a set of classes from a 3rd party library. These classes use an inheritance structure to share logic. I would like to add a layer of abstraction in the middle of their inheritance tree to add functionality to all of the children (concrete) implementations.
Adding base-class (inherited) functionality to classes that you don’t control
I have a set of classes from a 3rd party library. These classes use an inheritance structure to share logic. I would like to add a layer of abstraction in the middle of their inheritance tree to add functionality to all of the children (concrete) implementations.
Adding base-class (inherited) functionality to classes that you don’t control
I have a set of classes from a 3rd party library. These classes use an inheritance structure to share logic. I would like to add a layer of abstraction in the middle of their inheritance tree to add functionality to all of the children (concrete) implementations.