a1qa interview question

Main question was about OOP based question.