DXC Technology Interview Question

about OOPs