Keeping track of scores in Java
<p>I'm new to Java and I'm currently writing a program for an assignment that represents a 'sports league' (classes to represent player/club/match/league)</p>

<p>My main problems are occurring in the league class. Here are the relevant variables to give you an idea how I'm storing things:</p>

<pre><code>public class League 
{
    private String leagueName;
    private ArrayList&lt;Club&gt; clubs;
    private ArrayList&lt;Match&gt; fixtures;
    private ArrayList&lt;String&gt; results2;
    private TreeMap&lt;Match, String&gt; results;
    private String topTeam;
    private String goldenBoot;

}
</code></pre>

<p>Currently trying to write a method in the League class which will print a 'league table' - i.e. a list of Clubs sorted by their points tally (held as variable in Club class) and I'm drawing a blank on it.</p>

<p>Further to this, I need to write two methods to find the top scorer (golden boot) and find the top team in the league; again I am drawing a blank. Perhaps I am overcomplicating things?</p>

<p><strong>Would be very grateful for suggestions/sample methods</strong> </p>

<p>EDIT:</p>

<p>Ok, so that method I'm trying to write is something beginning with:</p>

<pre><code>public void getLeagueTable() {
    for(Club c : clubs) {
        c.getTally();
    }
}
</code></pre>

<p>which would give the tally value for each Club object - but how to sort these results, and how to associate the highest with one Club is what's really troubling.</p>
