# Menu Demo This program demonstrates how to create a menu that will allow you to launch a task from a list. This allows you to avoid the long delay in launching a new program from the main Lejos menu. Each task is defined in a class, which must be a subclass of `Program`. `Program` defines two methods: * `GetTitle`: returns a string with the tasks title, to be displayed in the menu * `Run`: the actual code to run when the task is selected A simple example of this is the `Beep` class (see beep.quorum): ```quorum use Libraries.Robots.Lego.Sound class Beep is Program public action GetTitle returns text return "Beep" end public action Run Sound sound sound:BeepSequenceUp() end end ``` Once you have created a class for your task, create an instance of it and add it to the menu in `Main:Main` (in main.quorum): ```quorum Beep beep menu:Add(beep) ``` When you run the program, you will see a list of all tasks that you added to the menu. Use the up and down buttons to select the one you want to run, then press the center button to run it. To ensure reliability, ensure a long, firm press of each button. When you are done, press the back button to return to the Lejos menu.