Infosys interview question

Basic of oops concept Basic of sql question