A Stable Design for the State Design Pattern
The design of the state pattern is analyzed and the notion of stability of a design is proposed. Mathematical models and ideas from numerical analysis are used to derive a stable design for the state pattern. The stability of the design is illustrated by considering two canonical examples from the OO literature. Design Patterns in software engineering have been developed as a result of years of software development experience and provide design guidelines for software developers. In general, the definition of a design pattern is guided by the principles of Object-Oriented (OO) Programming.