Demonstration of State Pattern