Newput Infotech Interview Question

mainly based on oops