What is a Menu - Explanation


One of the simplest ways to let a user choose from multiple options is by using a menu system.  A menu is usually presented as a list of options, and the user can select from one of the choices.

 

For example:

  1. Play a New Game
  2. Load a Saved Game
  3. Exit the Program

    Your Selection? 

 

Depending upon the user's selection, they may be given a new menu of options, or some other kind of information.

 

In general, you should check the user's choice to make sure they have made a valid selection (in this case, 1, 2, or 3).  If they choose something else, redisplay the menu and their choices.  It is also good form to display some kind of message notifying the user of their mistake, in the hopes they won't make the same mistake again.