Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. [SOLVED] Re: How do I get the one part of the needed output for quarterly sales-statistics?

    A comment on your fix. The new code with the highestQuart array resets the value of highestQuart to zero every time the index to the array (allDivisoins) is incremented. 0 is the default contents of...
  2. [SOLVED] Re: How do I get the one part of the needed output for quarterly sales-statistics?

    Is the output correct now?
    What if there are two divisions with the same sales? Have you tested that?
  3. [SOLVED] Re: How do I get the one part of the needed output for quarterly sales-statistics?

    What does that mean? Each quarter has a highest sales figure amongst all the divisions. Why don't they all print?

    Look at the data you printed out again. Why are you comparing the highest...
  4. [SOLVED] Re: How do I get the one part of the needed output for quarterly sales-statistics?

    Have you looked at the printed output to see why the missing line is not being printed?

    There is data for 4 quarters, why doesn't the data for one of the quarters get printed?

    Look at the if...
  5. [SOLVED] Re: How do I get the one part of the needed output for quarterly sales-statistics?

    Did you compare the values printed with the data that was in the salesFigures array. Do the values of the variables used to control the print out that is not being printed show why it is not...
  6. [SOLVED] Re: How do I get the one part of the needed output for quarterly sales-statistics?

    You need to add labels to what is printed so it can be identified in the print out. A list of numbers is hard to tell what a number is. They all look the same. For example:...
  7. [SOLVED] Re: How do I get the one part of the needed output for quarterly sales-statistics?

    print out the values of all the variables used in the if statement BEFORE the if statement sees them.
  8. [SOLVED] Re: How do I get the one part of the needed output for quarterly sales-statistics?

    That print out does not show the values of any of the variables used in the code, like highestQuart, salesFigures[rows][cols], rows and cols.

    What information about the execution of the program...
  9. [SOLVED] Re: How do I get the one part of the needed output for quarterly sales-statistics?

    How are you working at debugging the code? I suggested using println statements so you can see what he computer sees and what it does as the code executes.
  10. [SOLVED] Re: How do I get the one part of the needed output for quarterly sales-statistics?

    Have you solved your problem now? None of your posts have said anything about what you are doing to solve the problem and what the progress is or what the current situation is.
  11. [SOLVED] Re: How do I get the one part of the needed output for quarterly sales-statistics?

    Your print out does not show the values of any of the variables used in the code, like highestQuart, salesFigures[rows][cols], rows and cols.

    Strange it printed 4 rows this time instead of 3...
  12. [SOLVED] Re: How do I get the one part of the needed output for quarterly sales-statistics?

    Strange you should ask me that.
    Why did you post here? I thought you had a problem you were trying to solve.
    I've suggested that you add some println statements to show you what the code is doing.
  13. [SOLVED] Re: How do I get the one part of the needed output for quarterly sales-statistics?

    What variables did you print out in the code that controls what the program prints?
    How did their values change as the program executed?

    That's the problem, right, some value was not printed. ...
  14. [SOLVED] Re: How do I get the one part of the needed output for quarterly sales-statistics?

    Is there an if statement that controls what is printed? Is it true when it is supposed to be true so the line is printed?

    Try debugging the code by adding a println statement that prints out the...
  15. [SOLVED] Re: How do I get the one part of the needed output for quarterly sales-statistics?

    Can you explain what the problem is?
    Show what the code does now, explain what is wrong with it and show what it should do.
  16. [SOLVED] Re: How do I get the one part of the needed output for quarterly sales-statistics?

    Please Edit your post and wrap your code with


    <YOUR CODE HERE>

    to get highlighting and preserve formatting.
Results 1 to 16 of 16