Qualcomm interview question

General question on software and OOP