Functions for shell script menus

Welcome on board!

First question: is this a homework or coursework?
In which case special rules apply... please have a look:

Second: We have no idea of your OS nor the current shell you are using...