Infogain interview question

OOPS concept