Exercice on design pattern