I want to build a command line interface with menus and sub-menus and eventually the leafs of the tree should be operations like..bank management -> account management -> add acount (insert account info)And I'm looking for a good way which works with the OO principles...Thanks for any piece of advice!
Best way to build a hierarchy CLI menu?
object oriented;cli
if you want OO I suggest a Menu interface with methods to write out the options and parsing the input and returning the next Menuso your main loop becomes:Menu menu = new StartMenu();    while(menu.isExit){    menu.writeOptions(stdOut);    Menu res = menu.parseInput(stdIn.readline());    if(res==null)        writeError(stdOut);    else        menu=res;}