Frage im Vorstellungsgespräch bei Capgemini

the coding question to implement inheritance and polymorphism