Examples of dessign patterns in java