Cake shop
Cakes stored on the shelf
Shopkeeper to handle BUY_CAKE from customer
Sell ice creams
Ice creams stored in the freezer
New shopkeeper to handle BUY_ICECREAM from customer
The state of the shop is now the number of cakes on the shelf along with the number of ice creams in the freezer.
상점이 판매 품목을 확장할 때, 새로운 품목의 담당자를 고용하여 그 일만 전담하게 하는 것이 효율적이다. 이같은 접근은 확장성을 고려한 것이다.
다음에 학습할 내용은 이 같은 논리를 기반으로 한다.