XYZ Tech interview question

Oops concept in programming language