Mphasis interview question

Simple OOPs concept