Wipro Interview Question

Oops concepts and it's method