MD interview question

oops concepts