Infosys interview question

OOPs concept and programming Logic