LLD Logo
LVL1
Observer Pattern

Step 1 of 4 · Define subject and observer contracts

1

Your task

Define subject and observer contracts

Separate the publisher role from the display notification role.

Create Observer with its temperature update operation.
Create Subject with observer subscription and notification operations.

weather_observer.py

Your draft · saved locally

1

Structural feedback only—your code stays in this browser and is not executed.