MenuState class and an example program.