Fortude interview question

Basic oop concepts