옵저버 패턴 : 옵저버(관찰자)들이 관찰하고 있는 대상자의 상태가 변화가 있을 때마다 대상자는 직접 목록의 각 관찰자들에게 통지하고 관찰자들은 알림을 받아 조치를 취하는 행동 패턴이다. interface CafeObserver { update(customerName: string, orderedItem: string): void; } class CustomerObserver implements CafeObserver { public update(customerName: string, orderedItem: string): void { console.log(`${customerName}님이 ${orderedItem}을(를) 주문했습니다.`); } } // 카페 class Cafe { private obse..