3 ms·
The most confusing things about OOP is inheritance vs subtyping vs union. You have a dequeue class, the stack and queue inherit dequeue. But dequeue is a subty
by revskill 4y ago
The most confusing things about OOP is inheritance vs subtyping vs union.
You have a dequeue class, the stack and queue inherit dequeue. But dequeue is a subtype of stack and queue.
About union, could i say an abstract class is a union (implicitly) of all its subclasses ?
- junon 4y agoNo, because then all subclass members would be implicitly available on the base abstract type, I believe. So "union" here doesn't make sense.