Tech Mahindra interview question

Asked about oops concept related things