Classic design patterns written in Java