Morgan Stanley interview question

Java inheritance and OOP