Adrosonic interview question

Basic oops concepts: