OneHash interview question

inheritance and polymorphism