Tech Mahindra interview question

oops concepts and front end