WD interview question

Testing on inheritance