Newgen Software interview question

How did you used oops concept in your code explain with example