Sollicitatievraag bij Tata Consultancy Services

Few inheritance programming question