Virtusa interview question

Blind Man Puzzle - GFG Inheritance Code