Design patterns are general tools for solving recurring software problems. In this tutorial, we will use pattern to refactor our code.