Subject in the Observer pattern has three tasks: i) Provide methods to register and remove observer. ii) Maintains a list of its observers/subscribers. iii) And notify them automatically when any state changes .
Subject in the Observer pattern has three tasks: i) Provide methods to register and remove observer. ii) Maintains a list of its observers/subscribers. iii) And notify them automatically when any state changes .