Evon Technologies interview question

Basic oops concept and programming problem