Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Page 2 of 2 FirstFirst 12
Results 26 to 27 of 27

Thread: Java Help

  1. #26
    Junior Member
    Join Date
    Dec 2013
    Posts
    25
    Thanks
    14
    Thanked 0 Times in 0 Posts

    Default Re: Programming Assignment

    Deleated

  2. #27
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    3,399
    My Mood
    Mellow
    Thanks
    83
    Thanked 472 Times in 463 Posts

    Default Re: Programming Assignment

    Encouraging you (and showing you how) to think through solving this yourself.

    Problem statement: It (the second loop) works the first time but when it comes to that point again after looping it won't loop anymore.

    Inspect the code with the purpose of the second while loop in mind, answer the following questions:

    1. It is supposed to loop when . . . . ? (answer the question - it's your code, you should know - the answer could even be a code comment).

    2. So the loop control variable, loop2, should be <blank> when the loop should execute and <blank> when the loop should not execute. (fill in the <blank>s with the correct answer.)

    3. When the loop runs and correct answers are given, the loop control variable, loop2, is set to <blank>. (fill in the <blank> with the correct answer.)

    4. Considering the answer to number 3, what must happen in order for the loop to run again?

    5. Considering the answer to number 4, what is the fix for the stated problem, "It (the second loop) works the first time but when it comes to that point again after looping it won't loop anymore?"

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Help with programming assignment! New!
    By thejewishpriest in forum Member Introductions
    Replies: 1
    Last Post: April 15th, 2013, 03:30 AM
  2. Help on programming assignment
    By aaronmcohen in forum AWT / Java Swing
    Replies: 0
    Last Post: March 7th, 2012, 06:47 PM
  3. Programming help with java assignment!
    By kami21 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: June 15th, 2011, 06:37 PM
  4. Programming assignment using inheritance
    By Slypher in forum What's Wrong With My Code?
    Replies: 2
    Last Post: May 4th, 2011, 05:42 PM
  5. programming assignment help
    By sdgseed in forum Threads
    Replies: 1
    Last Post: October 20th, 2010, 02:43 PM