Robert,
If it was me doing this (which it wouldn't be, because I don't like soccer
) I would perhaps write a Fixture class with homeTeam and awayTeam attributes. That way I could keep a list(array) of Fixtures, rather than a list of home teams and a list of away teams.
Assuming we keep the team names as
String's, in my Fixture class I might then have a method to see if a particular team played a certain Fixture (whether as home or away team).
perhaps the method would look something like this, assuming there are homeTeam and awayTeam attributes in the Fixture class...
this would allow me to loop through my list (could be an array, or could be an ArrayList perhaps) of Fixture objects, calling the involvesTeam() method to see if a particular team was involved at that fixture.
Hope this makes sense! I think trying to put all this into an array will perhaps just make things more confusing.
[ March 30, 2005: Message edited by: Ben Wood ]