Wipro interview question

Oops concepts and it's method