Applied Materials interview question

Implement state machine using OO/design pattern.