Infosys Interview Question

based on only oops and database