An example of User Interface using the State Pattern