Files
java-design-patterns/state/src/main/java/com/iluwatar/App.java

25 lines
486 B
Java
Raw Normal View History

2014-08-23 08:47:44 +03:00
package com.iluwatar;
2014-08-31 11:20:02 +03:00
/**
*
* In State pattern the object (Mammoth) has internal
* state object (State) that defines the current
* behavior. The state object can be changed
* to alter the behavior.
*
*/
2014-08-23 08:47:44 +03:00
public class App
{
public static void main( String[] args )
{
Mammoth mammoth = new Mammoth();
mammoth.observe();
mammoth.timePasses();
mammoth.observe();
mammoth.timePasses();
mammoth.observe();
}
}