DMI interview question

Explain your code, OOPS concept