Hi,

I have created FootballScore arrays as follow:

FootballScore[][] myScores = {
          FootballScore.TOUCHDOWN.values(),
           FootballScore.EXTRAPOINT.values(),
           ……..
        };

        FootballScore[][] yourScores = {
            FootballScore.FIELDGOAL.values(),
           ….
        };

In bellow calculating method I wanted to use following logic:
At first I calculate separately values for score and extrapoint and 
finally received values are added  (total=total1+total2).
I must have any mistake because I receive improper results.
Please advise.

BR
Rafał Laczek

private static int calcTotal(FootballScore[][] f) {
         int total1=0;
         int total2=0;
         int total = 0;
     
         for(int i=0;i<f.length; ++i){
             for(int j=0; j<f.length; ++j){
         total1+=f[i][j].score();
          total2+=f[i][j].extrapoint();
             }
         }

         return total=total1+total2;
    }

----------------------------------------------------
Julia Roberts i Clive Owen - zobacz, jak kradną fortunę.
Rewelacyjna komedia GRA DLA DWOJGA - kinach od 30 kwietnia.
Zobacz zwiastun filmu:
http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fgra.html&sid=706



--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to