• Post Reply Bookmark Topic Watch Topic
  • New Topic

State Design Pattern implementation.  RSS feed

 
chets patel
Ranch Hand
Posts: 77
Eclipse IDE Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to learn State design pattern. I took example of Order being placed and having different state. I have implemented it. But I am not sure it is correct way or not. Please check below code and help in that case.


From my client code I will get the context object depending on state.


Please let me know if above implementation is correct?
Thanks in advance.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!