Name the actor classes used in Observer pattern.

  • ConcreteObserver, Subject, Observer
  • Observer, ConcreteObserver, Subject
  • Subject, Observer, ConcreteObserver
  • Subject, Observer, ConcreteSubject
The actor classes used in the Observer pattern are: Subject, Observer, and ConcreteObserver. The Subject class is responsible for maintaining a list of its dependents and notifying them of changes to its state. The Observer class is an abstract class that defines the interface for updating dependents. The ConcreteObserver class is a concrete implementation of the Observer class, responsible for updating its state in response to changes to the subject's state.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *