Observer Pattern

# Observer Pattern: Establishing Dependencies Imagine building a system where multiple components need to react to the same event. Manually wiring each component to the event source becomes a tangled mess, difficult to maintain and scale. That's where the Observer Pattern comes to the rescue! This pattern provides a clean and efficient way to establish dependencies between objects, allowing one object (the subject) to notify a set of dependent objects (observers) whenever its state changes. It