###### Server Side Programming

####
Design Pattern-03. Observer Pattern

Observer modeThe observer mode is a message distribution mode, which can promptly notify the observer of the state of the observer.For example, when a supermarket has a discount, it is necessary to notify each supermarket customer, so that the supermarket can be regarded as an observer, and the customer is an observer.Implementation logicThe class diagram implemented by the observer pattern is as follows:Implementation steps: Define an Observer interface to constrain the methods that observers (