Jeavio interview question

Oops concepts and a dsa problem