Multiple design patterns in Java