Hexaware Technologies interview question

Oops concept and function declaration