design pattern source code

basic design pattern simple implementation