User Profile

Collapse

Profile Sidebar

Collapse
sosoatjava
sosoatjava
Last Activity: Apr 12 '07, 08:35 PM
Joined: Mar 6 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • sosoatjava
    replied to Question re keeping a program running
    in Java
    Thanks for that- I can get the "engine" of a problem OK- calculations, etc but the structure is still something I need work on. I would also like to "filter" on anything other than my set options, ie 1, 2, or 3, I would try treating the input as a string, then while input== 1 &&2&&3 route to my various methods; if not, echoing out a warning message to the effect that "please pick 1, 2 or 3"
    See more | Go to post

    Leave a comment:


  • sosoatjava
    started a topic Question re keeping a program running
    in Java

    Question re keeping a program running

    How can a simple program be kept running until a defined control character, say "x" or menu choice 4 is entered? I can prompt a menu, offer choices, take keyboard input, perform a calculation but would like it to keep "alive" re-prompting the choices again for more input and so on until my control character or number is entered, then to quit. Is it as simple as a while loop and while != "x"?
    See more | Go to post

  • sosoatjava
    replied to Basic Menu prompts in Java
    in Java
    Thanks for this- I will try when I'm near my compiler- I'll need to expand on it but I think if I can get the logic of this flow, I'll be able to move onto a bit more complexity, GUI prompts etc.Thanks again.
    See more | Go to post

    Leave a comment:


  • sosoatjava
    started a topic Basic Menu prompts in Java
    in Java

    Basic Menu prompts in Java

    New to Java. How best to deal with unexpected input from a menu prompt, e.g, A menu has 3 options, 1,2,3, typing 3 quits the program. However, how do you deal with anything else that may be entered? If 3.7 or JFJJfor any other incorrect input is entered how to not have the program quit with an exception error but to gracefully output an error message( this I can do) and re prompt for valid input?
    See more | Go to post
No activity results to display
Show More
Working...