Tickertape interview question

OOPS concepts