Siemens interview question

Explain oops concepts via code