design pattern learning example.