Connexions

Sections
You are here: Home » Content » State Design Pattern

About: State Design Pattern

Module by: Dung Nguyen, Stephen Wong. E-mail the authors

View content

Metadata

Name: State Design Pattern
ID: m17225
Language: English (en)
Summary: Many real-life systems change the way they behave as they change states. It is desirable for object models of such systems to be able to change their behaviors as if they are changing types dynamically. The state design pattern is a design solution for this problem of dynamic reclassification. The key element is to abstract the state dependent behavior of the system in question as an abstract class and encapsulate each concrete variant behavior as a concrete subclass.
Subject: Science and Technology
Keywords: design, dynamic, pattern, reclassification, state
License: Creative Commons Attribution License CC-BY 2.0

Authors: Dung Nguyen (dxnguyen@rice.edu), Stephen Wong (swong@rice.edu)
Copyright Holders: Dung Nguyen (dxnguyen@rice.edu), Stephen Wong (swong@rice.edu)
Maintainers: Dung Nguyen (dxnguyen@rice.edu), Stephen Wong (swong@rice.edu), Alex Tribble (prat@rice.edu)

Latest version: 1.5 (history)
First publication date: Jul 15, 2008 4:15 pm GMT-5
Last revision to module: Oct 22, 2009 11:55 am GMT-5

Module XML: m17225_1.5.cnxml

Version History

Version: 1.5 Oct 22, 2009 11:55 am GMT-5 by Stephen Wong
Changes:
Fixed some formatting

Version: 1.4 Oct 22, 2009 11:18 am GMT-5 by Dung Nguyen
Changes:
none

Version: 1.3 Jul 22, 2008 11:49 am GMT-5 by Dung Nguyen
Changes:
remove empty paragraphs

Version: 1.2 Jul 17, 2008 2:35 pm GMT-5 by Dung Nguyen
Changes:
fix the link to Question

Version: 1.1 Jul 17, 2008 11:15 am GMT-5 by Dung Nguyen
Changes:
new module

How to Reuse and Attribute This Content

If you derive a copy of this content using a Connexions account and publish your version, proper attribution of the original work will be automatically done for you.

If you reuse this work elsewhere, in order to comply with the attribution requirements of the license (CC-BY 2.0), you must include

  • the authors' names: Dung Nguyen, Stephen Wong
  • the title of the work: State Design Pattern
  • the Connexions URL where the work can be found: http://cnx.org/content/m17225/1.5/

See the citation section below for examples you can copy.

How to Cite and Attribute This Content

The following citation styles comply with the attribution requirements for the license (CC-BY 2.0) of this work:

American Chemical Society (ACS) Style Guide:

Nguyen, D.; Wong, S. State Design Pattern, Connexions Web site. http://cnx.org/content/m17225/1.5/, Oct 22, 2009.

American Medical Assocation (AMA) Manual of Style:

Nguyen D, Wong S. State Design Pattern [Connexions Web site]. October 22, 2009. Available at: http://cnx.org/content/m17225/1.5/.

American Psychological Assocation (APA) Publication Manual:

Nguyen, D., & Wong, S. (2009, October 22). State Design Pattern. Retrieved from the Connexions Web site: http://cnx.org/content/m17225/1.5/

Chicago Manual of Style (Bibliography):

Nguyen, Dung, and Stephen Wong. "State Design Pattern." Connexions. October 22, 2009. http://cnx.org/content/m17225/1.5/.

Chicago Manual of Style (Note):

Dung Nguyen and Stephen Wong, "State Design Pattern," Connexions, October 22, 2009, http://cnx.org/content/m17225/1.5/.

Chicago Manual of Style (Reference, in Author-Date style):

Nguyen, D., & Wong, S. 2009. State Design Pattern. Connexions, October 22, 2009. http://cnx.org/content/m17225/1.5/.

Modern Languages Association (MLA) Style Manual:

Nguyen, Dung, and Stephen Wong. State Design Pattern. Connexions. 22 Oct. 2009 <http://cnx.org/content/m17225/1.5/>.