OOP & Design Patterns - Inheritance - Types, Method Resolution Order & Diamond Problem
Given a class hierarchy where class D inherits from B and C, and both B and C inherit from A, which line in the following pseudocode is the subtle bug causing the Diamond Problem to manifest incorrectly?
1: class A { method foo() }
2: class B extends A { override foo() }
3: class C extends A { override foo() }
4: class D extends B, C { no override }
