CapitalVia interview question

OOPs principle