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 1 of 2 12 LastLast
Results 1 to 25 of 33

Thread: How do I get the one part of the needed output for quarterly sales-statistics?

  1. #1
    Member
    Join Date
    Jul 2011
    Posts
    62
    Thanks
    12
    Thanked 4 Times in 4 Posts

    Default How do I get the one part of the needed output for quarterly sales-statistics?

    The first part is the needed output with a missing part: the 3rd-quarter answer. The second part is the code itself, with only the indicated problem-area.


    Highest sales-division for Quarter-1: D-5
    Highest sales-division for Quarter-2: D-3
    Highest sales-division for Quarter-4: D-3


    Here is the problematic-code.

                    // Use these nested-loops to display the highest sales-division for a quarter.
                    for (int rows = 0; rows < QUARTERS; rows++)
                    {
                         for (int cols = 0; cols < DIVISIONS; cols++)
                         {
                              if (salesFigures[rows][cols] > highestQuart)
                              {
                                   highestQuart = salesFigures[rows][cols];
                              }
                         }
                         for (int cols = 0; cols < DIVISIONS; cols++)
                         {
                              if (salesFigures[rows][cols] == highestQuart)
                              {
                                   System.out.println("Highest sales-division for Quarter-" + (rows + 1) + ":" + " D-" + (cols + 1));
                              }
                         }
                    }
    Last edited by SOG; June 24th, 2012 at 01:15 PM.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,165
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default 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
    [code=java]
    <YOUR CODE HERE>
    [/code]
    to get highlighting and preserve formatting.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Member
    Join Date
    Jul 2011
    Posts
    62
    Thanks
    12
    Thanked 4 Times in 4 Posts

    Default Re: How do I get the one part of the needed output for quarterly sales-statistics?

    Quote Originally Posted by Norm View Post
    Please Edit your post and wrap your code with
    [code=java]
    <YOUR CODE HERE>
    [/code]
    to get highlighting and preserve formatting.
    I did what you told me to do and understood you - along with some editing on my part because of an article I read on this website. Now what?

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,165
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default 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.
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Member
    Join Date
    Jul 2011
    Posts
    62
    Thanks
    12
    Thanked 4 Times in 4 Posts

    Default Re: How do I get the one part of the needed output for quarterly sales-statistics?

    Right now, the code displays this...

    Highest sales-division for Quarter-1: D-5
    Highest sales-division for Quarter-2: D-3
    Highest sales-division for Quarter-4: D-3

    ...instead of what it is supposed to display - something like the following-part with a number where the hashtag is:

    Highest sales-division for Quarter-1: D-5
    Highest sales-division for Quarter-2: D-3
    Highest sales-division for Quarter-3: D-#
    Highest sales-division for Quarter-4: D-3

    Now, what I think is wrong with it is that either 1+ lines are missing or that there is a newline to consume.

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,165
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default 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 values used in the if statement so you can see why the program does what it does. When you see the values printed out you may be able to understand what is happening.
    If you don't understand my answer, don't ignore it, ask a question.

  7. #7
    Member
    Join Date
    Jul 2011
    Posts
    62
    Thanks
    12
    Thanked 4 Times in 4 Posts

    Default Re: How do I get the one part of the needed output for quarterly sales-statistics?

    Quote Originally Posted by Norm View Post
    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 values used in the if statement so you can see why the program does what it does. When you see the values printed out you may be able to understand what is happening.
    I notice what you told me and I did this somehow figuring out that I was using an accumulator as a highest-number variable in this case. I believe I confused the computer out of the confusion of knowing less about an algorithm than I think. The algorithm is supposed to find the highest-number in a set of numbers.

    What info do you need to help me out with this problem?

    I ask this because I'm trying to get the colz variable from the highest-number element in the array when it comes to my new code-setup below:

                    // Use these nested-loops to display the highest sales-division for a quarter.
                    for (int rows = 0; rows < QUARTERS; rows++)
                    {
                         for (int cols = 0; cols < DIVISIONS; cols++)
                         {
                              if (salesFigures[rows][cols] > highestQuart)
                              {
                                   highestQuart = salesFigures[rows][cols];
                              }
                         }
     
                         for (int colz = 0; colz < DIVISIONS; colz++)
                         {
                              if (salesFigures[rows][colz] == highestQuart)
                              {
                                   System.out.println("Highest sales-division for Quarter-" + (rows + 1) + "D-" + (colz + 1));
                              }
                         }
                    }
    Last edited by SOG; June 25th, 2012 at 09:26 PM.

  8. #8
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,165
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default 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. Why wasn't it printed? Some problem in the code kept the program from executing the print statement.
    If you don't understand my answer, don't ignore it, ask a question.

  9. #9
    Member
    Join Date
    Jul 2011
    Posts
    62
    Thanks
    12
    Thanked 4 Times in 4 Posts

    Default Re: How do I get the one part of the needed output for quarterly sales-statistics?

    Just to be sure, what problem is that?

  10. #10
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,165
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: How do I get the one part of the needed output for quarterly sales-statistics?

    what problem is that?
    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.
    If you don't understand my answer, don't ignore it, ask a question.

  11. #11
    Member
    Join Date
    Jul 2011
    Posts
    62
    Thanks
    12
    Thanked 4 Times in 4 Posts

    Default Re: How do I get the one part of the needed output for quarterly sales-statistics?

    I see your point. I tried to do what you said and set this code below up...

                    // Use these nested-loops to display the highest sales-division for a quarter.
                    for (int rows = 0; rows < QUARTERS; rows++)
                    {
                         for (int cols = 0; cols < DIVISIONS; cols++)
                         {
                              if (salesFigures[rows][cols] > highestQuart)
                              {
                                   highestQuart = salesFigures[rows][cols];
                              }
                         }
     
                         for (int cols = 0; cols < DIVISIONS; cols++)
                         {
                              if (salesFigures[rows][cols] == highestQuart)
                              {
                                   System.out.println("Highest sales-division for Quarter-");
                              }
                         }
                    }

    ...and came up with this output in bold.


    Highest sales-division for Quarter-
    Highest sales-division for Quarter-
    Highest sales-division for Quarter-
    Highest sales-division for Quarter-


    It does happen to print something out for each quarter.

  12. #12
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,165
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default 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 like the other times.
    If you don't understand my answer, don't ignore it, ask a question.

  13. #13
    Member
    Join Date
    Jul 2011
    Posts
    62
    Thanks
    12
    Thanked 4 Times in 4 Posts

    Default Re: How do I get the one part of the needed output for quarterly sales-statistics?

    Quote Originally Posted by Norm View Post
    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 like the other times.
    I notice what you mean - it was because of a typo in my text editor. I used the last code-setup I gave you and this output came out...

    Highest sales-division for Quarter-

  14. #14
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,165
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default 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.
    If you don't understand my answer, don't ignore it, ask a question.

  15. #15
    Member
    Join Date
    Jul 2011
    Posts
    62
    Thanks
    12
    Thanked 4 Times in 4 Posts

    Default Re: How do I get the one part of the needed output for quarterly sales-statistics?

    I haven't solved the problem yet, but I have made some adjustments. Up in the higher-part of the program, I've tried to follow or copy (to an extent) what my textbook was saying about array-utilization by using this initialization below...

    double highestQuart = salesFigures[0][0],

    ...instead of this one.

    double highestQuart = 0,

    I think the first piece of code here is supposed to either start an array fill-up, be a single accumulator, or become a replaceable-value variable, while the second one is just an accumulator. I can't seem to make a declaration-statement without initializing this variable.

    I also tried to use the second nested-for-loop to display the rows and cols values, and came up with this...

    Highest sales-division for Quarter-1: D-5
    Highest sales-division for Quarter-2: D-3
    Highest sales-division for Quarter-3: D-6
    Highest sales-division for Quarter-4: D-4

    ...but came up with this the second time.
    Highest sales-division for Quarter-1: D-6
    Highest sales-division for Quarter-3: D-3

    That is all I remember doing.

  16. #16
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,165
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default 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.
    If you don't understand my answer, don't ignore it, ask a question.

  17. #17
    Member
    Join Date
    Jul 2011
    Posts
    62
    Thanks
    12
    Thanked 4 Times in 4 Posts

    Default Re: How do I get the one part of the needed output for quarterly sales-statistics?

    I typed in a println-statement that says "Statement printout here." and it appeared 3 times in a row.

  18. #18
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,165
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default 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 did your 3 print outs give you?
    If you don't understand my answer, don't ignore it, ask a question.

  19. #19
    Member
    Join Date
    Jul 2011
    Posts
    62
    Thanks
    12
    Thanked 4 Times in 4 Posts

    Default Re: How do I get the one part of the needed output for quarterly sales-statistics?

    Quote Originally Posted by Norm View Post
    What information about the execution of the program did your 3 print outs give you?
    The information given to me was that the if-statement worked 3 times, but that something I haven't identified in the if-statement stopped it from printing a 4th one. Maybe it was a newline-statement to consume.

  20. #20
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,165
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: How do I get the one part of the needed output for quarterly sales-statistics?

    something I haven't identified in the if-statement
    print out the values of all the variables used in the if statement BEFORE the if statement sees them.
    If you don't understand my answer, don't ignore it, ask a question.

  21. #21
    Member
    Join Date
    Jul 2011
    Posts
    62
    Thanks
    12
    Thanked 4 Times in 4 Posts

    Default 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.
    I did what you told me to do...

                    // Use these nested-loops to display the highest sales-division for a quarter.
                    for (int rows = 0; rows < QUARTERS; rows++)
                    {
                         for (int cols = 0; cols < DIVISIONS; cols++)
                         {
                              if (salesFigures[rows][cols] > highestQuart)
                              {
                                   highestQuart = salesFigures[rows][cols];
                              }
                         }
     
                         for (int cols = 0; cols < DIVISIONS; cols++)
                         {
                              System.out.println(rows + " " + cols);
     
                              if (salesFigures[rows][cols] == highestQuart)
                              {
                                   System.out.println("Statement printout here.");
                              }
                         }
                    }

    ...and came up with the following output.


    0 0
    Statement printout here.
    0 1
    0 2
    0 3
    0 4
    0 5
    1 0
    1 1
    1 2
    1 3
    1 4
    1 5
    2 0
    2 1
    Statement printout here.
    2 2
    2 3
    2 4
    2 5
    3 0
    3 1
    3 2
    3 3
    3 4
    3 5
    Last edited by SOG; June 26th, 2012 at 01:21 PM.

  22. #22
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,165
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default 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:
    System.out.println("rows=" + rows + ", cols=" + cols);

    Where are the values for: highestQuart and salesFigures[rows][cols]
    Those two are the important ones.

    The numbers that you printed are exactly what you'd expect for a nested loop.
    If you don't understand my answer, don't ignore it, ask a question.

  23. #23
    Member
    Join Date
    Jul 2011
    Posts
    62
    Thanks
    12
    Thanked 4 Times in 4 Posts

    Default Re: How do I get the one part of the needed output for quarterly sales-statistics?

    I did that part as well with this setup below...

                    // Use these nested-loops to display the highest sales-division for a quarter.
                    for (int rows = 0; rows < QUARTERS; rows++)
                    {
                         for (int cols = 0; cols < DIVISIONS; cols++)
                         {
                              if (salesFigures[rows][cols] > highestQuart)
                              {
                                   highestQuart = salesFigures[rows][cols];
                              }
                         }
     
                         for (int cols = 0; cols < DIVISIONS; cols++)
                         {
                              System.out.println("rows = " + rows + " & cols = " + cols);
                              System.out.println("salesFigures[rows][cols] = " 
                                                 + salesFigures[rows][cols] 
                                                 + " & highestQuart = " + highestQuart);
     
                              if (salesFigures[rows][cols] == highestQuart)
                              {
                                   System.out.println("Inside if-statement, rows = " + rows + " & cols = " + cols);
                                   System.out.println("Inside of if statement, salesFigures[rows][cols] = " 
                                                      + salesFigures[rows][cols] 
                                                      + " & highestQuart = " + highestQuart);
                              }
                         }
                    }

    ...and came up with this. (Anything that says "inside of if-statement" refers to the what the if-statements sees.)

     

    rows = 0 & cols = 0
    salesFigures[rows][cols] = 3455.0 & highestQuart = 3455.0
    Inside if-statement, rows = 0 & cols = 0
    Inside of if statement, salesFigures[rows][cols] = 3455.0 & highestQuart = 3455.
    0
    rows = 0 & cols = 1
    salesFigures[rows][cols] = 456.0 & highestQuart = 3455.0
    rows = 0 & cols = 2
    salesFigures[rows][cols] = 455.0 & highestQuart = 3455.0
    rows = 0 & cols = 3
    salesFigures[rows][cols] = 456.0 & highestQuart = 3455.0
    rows = 0 & cols = 4
    salesFigures[rows][cols] = 654.0 & highestQuart = 3455.0
    rows = 0 & cols = 5
    salesFigures[rows][cols] = 456.0 & highestQuart = 3455.0
    rows = 1 & cols = 0
    salesFigures[rows][cols] = 6554.0 & highestQuart = 76654.0
    rows = 1 & cols = 1
    salesFigures[rows][cols] = 456.0 & highestQuart = 76654.0
    rows = 1 & cols = 2
    salesFigures[rows][cols] = 76654.0 & highestQuart = 76654.0
    Inside if-statement, rows = 1 & cols = 2
    Inside of if statement, salesFigures[rows][cols] = 76654.0 & highestQuart = 7665
    4.0
    rows = 1 & cols = 3
    salesFigures[rows][cols] = 6677.0 & highestQuart = 76654.0
    rows = 1 & cols = 4
    salesFigures[rows][cols] = 766.0 & highestQuart = 76654.0
    rows = 1 & cols = 5
    salesFigures[rows][cols] = 56567.0 & highestQuart = 76654.0
    rows = 2 & cols = 0
    salesFigures[rows][cols] = 7665.0 & highestQuart = 76654.0
    rows = 2 & cols = 1
    salesFigures[rows][cols] = 567.0 & highestQuart = 76654.0
    rows = 2 & cols = 2
    salesFigures[rows][cols] = 8898.0 & highestQuart = 76654.0
    rows = 2 & cols = 3
    salesFigures[rows][cols] = 455.0 & highestQuart = 76654.0
    rows = 2 & cols = 4
    salesFigures[rows][cols] = 456.0 & highestQuart = 76654.0
    rows = 2 & cols = 5
    salesFigures[rows][cols] = 6777.0 & highestQuart = 76654.0
    rows = 3 & cols = 0
    salesFigures[rows][cols] = 6665.0 & highestQuart = 76654.0
    rows = 3 & cols = 1
    salesFigures[rows][cols] = 555.0 & highestQuart = 76654.0
    rows = 3 & cols = 2
    salesFigures[rows][cols] = 44.7 & highestQuart = 76654.0
    rows = 3 & cols = 3
    salesFigures[rows][cols] = 7887.3 & highestQuart = 76654.0
    rows = 3 & cols = 4
    salesFigures[rows][cols] = 5667.8 & highestQuart = 76654.0
    rows = 3 & cols = 5
    salesFigures[rows][cols] = 7678.0 & highestQuart = 76654.0


    Last edited by SOG; June 26th, 2012 at 01:50 PM.

  24. #24
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,165
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default 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 printing?

    Why isn't the line being printed for the 3rd division?


    BTW The loop control variables names are not well chosen. Your data is for divisions and quarters, not rows and columns. The variable names should be for what the data is: quarter and division

    What data is a row? Is it a division or a quarter? The print out should show that directly, not require you to do a mental translation.

    EDIT: Some of The println statements should be BEFORE the if statements to show the values of the variables BEFORE they are tested and used.
    For example this line does not make sense:
    salesFigures[rows][cols] = 6554.0 & highestQuart = 76654.0

    How did highestQuart get that value before the salesFigures value shows it?? The logic of the code says that the salesFigures value must be compared to the current highestQuarter value BEFORE the highestQuarter value is changed.
    Last edited by Norm; June 26th, 2012 at 02:03 PM.
    If you don't understand my answer, don't ignore it, ask a question.

  25. #25
    Member
    Join Date
    Jul 2011
    Posts
    62
    Thanks
    12
    Thanked 4 Times in 4 Posts

    Default Re: How do I get the one part of the needed output for quarterly sales-statistics?

    I remember two important things you said...

    The loop control variables names are not well chosen.
    ...and...

    Some of The println statements should be BEFORE the if statements to show the values of the variables BEFORE they are tested and used.
    So, I wrote this...

                     // Use these nested-loops to display the highest sales-division for a quarter.
                    for (int quarters = 0; quarters < QUARTERS; quarters++)
                    {
     
                         for (int divisions = 0; divisions < DIVISIONS; divisions++)
                         {
                              System.out.println("Before first if statement is all this...");
                              System.out.println("quarters = " + quarters + " & divisions = " + divisions);
                              System.out.println("salesFigures[quarters][divisions] = " 
                                                 + salesFigures[quarters][divisions] 
                                                 + " & highestQuart = " + highestQuart);
     
                              if (salesFigures[quarters][divisions] > highestQuart)
                              {
                                   highestQuart = salesFigures[quarters][divisions];
                              }
                         }
     
                         for (int divisions = 0; divisions < DIVISIONS; divisions++)
                         {
                              System.out.println("Before second if statement is all this...");
                              System.out.println("quarters = " + quarters + " & divisions = " + divisions);
                              System.out.println("salesFigures[quarters][divisions] = " 
                                                 + salesFigures[quarters][divisions] 
                                                 + " & highestQuart = " + highestQuart);
     
                              if (salesFigures[quarters][divisions] == highestQuart)
                              {
                                   System.out.println("Inside if-statement, quarters = " + quarters + " & divisions = " + divisions);                                                         
                              }
                         }
                    }

    ...and came up with this below: 7 different highestQuart-values.

     

    Before first if statement is all this...
    quarters = 0 & divisions = 0
    salesFigures[quarters][divisions] = 456.0 & highestQuart = 0.0
    Before first if statement is all this...
    quarters = 0 & divisions = 1
    salesFigures[quarters][divisions] = 544.0 & highestQuart = 456.0
    Before first if statement is all this...
    quarters = 0 & divisions = 2
    salesFigures[quarters][divisions] = 768.0 & highestQuart = 544.0
    Before first if statement is all this...
    quarters = 0 & divisions = 3
    salesFigures[quarters][divisions] = 976.0 & highestQuart = 768.0
    Before first if statement is all this...
    quarters = 0 & divisions = 4
    salesFigures[quarters][divisions] = 356.0 & highestQuart = 976.0
    Before first if statement is all this...
    quarters = 0 & divisions = 5
    salesFigures[quarters][divisions] = 7876.0 & highestQuart = 976.0
    Before second if statement is all this...
    quarters = 0 & divisions = 0
    salesFigures[quarters][divisions] = 456.0 & highestQuart = 7876.0
    Before second if statement is all this...
    quarters = 0 & divisions = 1
    salesFigures[quarters][divisions] = 544.0 & highestQuart = 7876.0
    Before second if statement is all this...
    quarters = 0 & divisions = 2
    salesFigures[quarters][divisions] = 768.0 & highestQuart = 7876.0
    Before second if statement is all this...
    quarters = 0 & divisions = 3
    salesFigures[quarters][divisions] = 976.0 & highestQuart = 7876.0
    Before second if statement is all this...
    quarters = 0 & divisions = 4
    salesFigures[quarters][divisions] = 356.0 & highestQuart = 7876.0
    Before second if statement is all this...
    quarters = 0 & divisions = 5
    salesFigures[quarters][divisions] = 7876.0 & highestQuart = 7876.0
    Inside if-statement, quarters = 0 & divisions = 5
    Before first if statement is all this...
    quarters = 1 & divisions = 0
    salesFigures[quarters][divisions] = 456.0 & highestQuart = 7876.0
    Before first if statement is all this...
    quarters = 1 & divisions = 1
    salesFigures[quarters][divisions] = 876.0 & highestQuart = 7876.0
    Before first if statement is all this...
    quarters = 1 & divisions = 2
    salesFigures[quarters][divisions] = 456.0 & highestQuart = 7876.0
    Before first if statement is all this...
    quarters = 1 & divisions = 3
    salesFigures[quarters][divisions] = 776.0 & highestQuart = 7876.0
    Before first if statement is all this...
    quarters = 1 & divisions = 4
    salesFigures[quarters][divisions] = 456.0 & highestQuart = 7876.0
    Before first if statement is all this...
    quarters = 1 & divisions = 5
    salesFigures[quarters][divisions] = 776.0 & highestQuart = 7876.0
    Before second if statement is all this...
    quarters = 1 & divisions = 0
    salesFigures[quarters][divisions] = 456.0 & highestQuart = 7876.0
    Before second if statement is all this...
    quarters = 1 & divisions = 1
    salesFigures[quarters][divisions] = 876.0 & highestQuart = 7876.0
    Before second if statement is all this...
    quarters = 1 & divisions = 2
    salesFigures[quarters][divisions] = 456.0 & highestQuart = 7876.0
    Before second if statement is all this...
    quarters = 1 & divisions = 3
    salesFigures[quarters][divisions] = 776.0 & highestQuart = 7876.0
    Before second if statement is all this...
    quarters = 1 & divisions = 4
    salesFigures[quarters][divisions] = 456.0 & highestQuart = 7876.0
    Before second if statement is all this...
    quarters = 1 & divisions = 5
    salesFigures[quarters][divisions] = 776.0 & highestQuart = 7876.0
    Before first if statement is all this...
    quarters = 2 & divisions = 0
    salesFigures[quarters][divisions] = 123.0 & highestQuart = 7876.0
    Before first if statement is all this...
    quarters = 2 & divisions = 1
    salesFigures[quarters][divisions] = 547.0 & highestQuart = 7876.0
    Before first if statement is all this...
    quarters = 2 & divisions = 2
    salesFigures[quarters][divisions] = 848.0 & highestQuart = 7876.0
    Before first if statement is all this...
    quarters = 2 & divisions = 3
    salesFigures[quarters][divisions] = 567.0 & highestQuart = 7876.0
    Before first if statement is all this...
    quarters = 2 & divisions = 4
    salesFigures[quarters][divisions] = 8923.0 & highestQuart = 7876.0
    Before first if statement is all this...
    quarters = 2 & divisions = 5
    salesFigures[quarters][divisions] = 4567.0 & highestQuart = 8923.0
    Before second if statement is all this...
    quarters = 2 & divisions = 0
    salesFigures[quarters][divisions] = 123.0 & highestQuart = 8923.0
    Before second if statement is all this...
    quarters = 2 & divisions = 1
    salesFigures[quarters][divisions] = 547.0 & highestQuart = 8923.0
    Before second if statement is all this...
    quarters = 2 & divisions = 2
    salesFigures[quarters][divisions] = 848.0 & highestQuart = 8923.0
    Before second if statement is all this...
    quarters = 2 & divisions = 3
    salesFigures[quarters][divisions] = 567.0 & highestQuart = 8923.0
    Before second if statement is all this...
    quarters = 2 & divisions = 4
    salesFigures[quarters][divisions] = 8923.0 & highestQuart = 8923.0
    Inside if-statement, quarters = 2 & divisions = 4
    Before second if statement is all this...
    quarters = 2 & divisions = 5
    salesFigures[quarters][divisions] = 4567.0 & highestQuart = 8923.0
    Before first if statement is all this...
    quarters = 3 & divisions = 0
    salesFigures[quarters][divisions] = 457.0 & highestQuart = 8923.0
    Before first if statement is all this...
    quarters = 3 & divisions = 1
    salesFigures[quarters][divisions] = 321.0 & highestQuart = 8923.0
    Before first if statement is all this...
    quarters = 3 & divisions = 2
    salesFigures[quarters][divisions] = 4578.0 & highestQuart = 8923.0
    Before first if statement is all this...
    quarters = 3 & divisions = 3
    salesFigures[quarters][divisions] = 86655.0 & highestQuart = 8923.0
    Before first if statement is all this...
    quarters = 3 & divisions = 4
    salesFigures[quarters][divisions] = 45.0 & highestQuart = 86655.0
    Before first if statement is all this...
    quarters = 3 & divisions = 5
    salesFigures[quarters][divisions] = 78.0 & highestQuart = 86655.0
    Before second if statement is all this...
    quarters = 3 & divisions = 0
    salesFigures[quarters][divisions] = 457.0 & highestQuart = 86655.0
    Before second if statement is all this...
    quarters = 3 & divisions = 1
    salesFigures[quarters][divisions] = 321.0 & highestQuart = 86655.0
    Before second if statement is all this...
    quarters = 3 & divisions = 2
    salesFigures[quarters][divisions] = 4578.0 & highestQuart = 86655.0
    Before second if statement is all this...
    quarters = 3 & divisions = 3
    salesFigures[quarters][divisions] = 86655.0 & highestQuart = 86655.0
    Inside if-statement, quarters = 3 & divisions = 3
    Before second if statement is all this...
    quarters = 3 & divisions = 4
    salesFigures[quarters][divisions] = 45.0 & highestQuart = 86655.0
    Before second if statement is all this...
    quarters = 3 & divisions = 5
    salesFigures[quarters][divisions] = 78.0 & highestQuart = 86655.0


Page 1 of 2 12 LastLast

Similar Threads

  1. Total Sales Error
    By KRUKUSA in forum What's Wrong With My Code?
    Replies: 4
    Last Post: March 19th, 2012, 08:20 PM
  2. Sales not working
    By JeremiahWalker in forum What's Wrong With My Code?
    Replies: 2
    Last Post: February 9th, 2012, 10:07 AM
  3. [SOLVED] Need statistics Homework help?
    By keith thomas in forum Java Theory & Questions
    Replies: 1
    Last Post: January 7th, 2011, 02:20 AM
  4. Black Jack Statistics game? lost.
    By mindlessn00b in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 20th, 2010, 07:20 AM
  5. How to save statistics of a game in a binary file instead of txt file?
    By FretDancer69 in forum File I/O & Other I/O Streams
    Replies: 4
    Last Post: June 19th, 2009, 05:05 AM

Tags for this Thread