Design Pattern DEMO code