정의 : 한 객체의 상태가 바뀌면 그 객체에 의존하는 다른 객체들한테 연락이 가고 자동으로 내용이 갱신되는 방식으로 일대다 의존성을 정의합니다.
Publisher publisher = new publisher();
new SubscriberA(publisher);
new SubscriberB(publisher);
publisher.setBook("aaa");
publisher.setBook("bbb");
// push 방식
Publisher에서 Subscriber들에게 Publish할 때 IObserver.update(전달값) 호출함
// pull 방식
Publisher에서 Subscriber들에게 Publish할 때 IObserver.update(Publisher) 호출하고 Subscriber에서 Publisher의 변경된 book값을 조회함