So I am trying to implement a menu that loops in a CLI simulator, I have the menu implemented but I am stuck figuring out how to make it loop or progress to the next option that requires input from the user. I have used scanner in for the menu, see attached files for what I have done. There are 5 attached java files and probably could make it so there is only three of them which would include the cars class when I make it. I have access to netbeans and IntelliJ to work on it.

Recommended Answers

All 7 Replies

You have too many files for anyone to work with easily.
Can you make a small simple program that compiles and executes and demonstrates the problem and post that here?

ok attached is the compile jar file of those files.

Sorry, I dont' like executing code I don't create from source.

Can you make a small simple program that compiles and executes and demonstrates the problem and post that here?

There isn't a problem, I just need it to loop after each menu choice to display the menu again or go to the next option in the menu. Which if you grab the original java files and compile them you will see.

Can you make a small simple program that compiles and executes and demonstrates the problem and post that here?
A small simple program is easier to work with than the whole project which will have lots of code not related to the problem.

It is all related as the menu calls on variables in other files to do its options

Have you tried moving some of the code to methods?
Have a loop to call the methods in the order that you need.
Have boolean flags to keep track of the order of processing.

Make a small simple program that compiles and executes and demonstrates the problem

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.