Exercise: team games

You are modeling a sports league—it could be any team sport. Certainly one important class is the team, which will have a name (unique within the league), a coach, a home field or venue, and probably more attributes.

• Obviously, teams play games. In each game, there is a designated “home team” and “away team” (even if the game is played at a neutral venue). Teams may play each other more than once during a season, possibly even with the same home and away roles (for example, during playoffs).

• Design a class diagram that shows the teams, the games that they play, and the score of each game. Then draw the relation scheme for your model.