The program starts by giving the user 4 options:
-
If you enter the number 1, you can create a recipe that will be added to the recipe book. The program will prompt you for information such as the name of the recipe, a description, the ingredients, and the steps.
-
If you enter the number 2, you can search through the recipe book for pre-existing recipes. The program will prompt you for a name, and will search for it in the recipe book. If it cannot be found, an error message will be displayed.
-
If you enter the number 3, the program will print a list of the names of all recipes currently in the recipe book, in order of when they were first added. It will then prompt you to choose one of the recipes to look at. Once you choose a recipe, the program prints the description, the ingredients, and the steps. You also have the option to look at the steps one by one.
-
If you enter the number -1, the program will print a message and terminate
Any number that is not one of the above will make the program prompt you for a valid number. If you input something other than a number, the program will terminate.