3 ms·
You can have polymorphism without inheritance. A single class can implement multiple interfaces, and multiple classes may implement the same interface. What is
by rovolo 6y ago
You can have polymorphism without inheritance. A single class can implement multiple interfaces, and multiple classes may implement the same interface.
What is your background? C++ combines interfaces and abstract classes, so this may be the issue you're running into. An interface is an abstract class with no instance variables or method implementations. The trouble with inheritance lies in overriding the superclass's method implementations.