Pergunta de entrevista da empresa Thoughtworks

How to refactor common code into a base class.