Changes

Jump to: navigation, search

State

57 bytes added, 22:25, 22 March 2007
Advantages of using State Pattern
'''2. State pattern makes state transition explicit. '''
If the state is defined with an internal data values, its state transition do not have explicit representation. If a variable is used to specify its current state, it will have a structure that contains be difficult to extend and maintain since the states and transitions are handled using many if or and switch statements.
'''3. State objects can be shared by other classes.'''
1
edit

Navigation menu