posted 14 years ago
I'm currently creating a class to handle menu options. So far I am able to create menu's with options ie:
And I have written the code in order to output the options so it looks like this:
So here is where I don't know if there is better method to implement what I want to do next, but essentially right now I take the user input and then I use a switch and case in a HandleMenu file. I don't think this is the best solution because it implies that I have knowledge of all the menu options.
I want to somehow include the method call in the Menu class so it would look something like this:
Does anyone have an idea on how I would implement this; I hope I was clear.