Domanda di colloquio di Thoughtworks

How to refactor common code into a base class.