Suppose we’ve a system like thermometer that measures the room temperature

public class Thermometer {
    private int temp = 0;
    public void setTemp(int temp) {
        this.temp = temp;
	System.out.println("Subject | temp = " + temp);

    public int getTemp() {
        return temp;

We want to get notified when every change in temperature happens.
Suppose that many other systems wants to be notified and these systems may varies and we want to make a good solution to handle this without the need to modify our code multiple times to handle new added systems