CSC/ECE 517 Fall 2012/ch2b 2w63 sp

From Expertiza_Wiki
Revision as of 01:01, 18 November 2012 by Jtcole2 (talk | contribs) (Created page with "= Introduction = The State pattern is a simple behavioral design pattern intended to represent the different possible states of an object. The following sites are those found to...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

The State pattern is a simple behavioral design pattern intended to represent the different possible states of an object. The following sites are those found to be helpful in understanding the pattern.

Wikipedia

The Wikiepdia article on the State pattern provides a small overview of the pattern and provides a pair code examples, in Java and pseudocode. The article also provides two diagrams explaining the class layout of the pattern and a basic FSM. The benefit of the article is that it provides quick examples and definitions for reference.

Sourcemaking

Sourcemaking.com provides a much deeper look at the pattern overall, including the intent, problem addressed, and structure of the pattern. The site provides a list of common qualities and rules of thumb seen when using the design pattern. This site's explanation of the pattern is much richer overall and it provides more examples in the same language than found on the Wikipedia article.