Java Design Pattern: Decorator – Decorate your girlfriend
Decorator pattern adds additional features to an existing object dynamically. In this post, I will use a simple example – decorate your girlfriend – to illustrate how decorator pattern works. 1. Decorator Pattern Story Let’s assume you are looking for a girlfriend. There are girls from different countries such as America, China, Japan, France, etc. … Read more