Search:

Type: Posts; User: GregBrannon

Search: Search took 0.17 seconds.

  1. [SOLVED] Re: [UNSOLVED] If Statements/Boolean Based Program Help

    Your test for the end of the game is in the wrong place. Shouldn't it be AFTER either team scores? Other than that, great job moving things around and following simple directions!
  2. [SOLVED] Re: [UNSOLVED] If Statements/Boolean Based Program Help

    Then instead of a method, do this to print the score each time:

    System.out.println( "Home: " + homeScore + " Away: " + awayScore );

    instead of:

    System.out.println(total);
  3. [SOLVED] Re: [UNSOLVED] If Statements/Boolean Based Program Help

    See what I added to my previous post.
  4. [SOLVED] Re: [UNSOLVED] If Statements/Boolean Based Program Help

    These statements can be improved on a couple levels:

    while (homeBall = true)

    '=' is the assignment operator, '==' is to compare equality. However, there's no reason to compare a boolean to...
  5. [SOLVED] Re: [UNSOLVED] If Statements/Boolean Based Program Help

    While one type of loop might be more appropriate in a given situation than the others, ALL can be written to be interchangeable. Show what you tried and describe the results. Show the whole program...
  6. [SOLVED] Re: [UNSOLVED] If Statements/Boolean Based Program Help

    Then you probably know that the typical loops are for loops, while loops, and do/while loops.

    What "last two big loops?" I don't see a for, while, or do/while loop anywhere in your code.
  7. [SOLVED] Re: [UNSOLVED] If Statements/Boolean Based Program Help

    You mention being new to looping, and that's exactly what you need here. Right now your program runs from top to bottom or from start to finish without repeating any of the code between. Repeating...
Results 1 to 7 of 7