行为型模式-观察者 Behavioral Patterns-Observer
Define a one to many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
Define a one to many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.