Design Patterns implementation using Java