DXC Technology interview question

about OOPs