Class Game

java.lang.Object
|
+--Game

public class Game
extends java.lang.Object

A Game represents a contest between two teams. Each Game records the home and away teams, and the home and away scores.


Constructor Summary
Game(java.lang.String homeTeam, java.lang.String awayTeam, int homeScore, int awayScore)
          Creates an object that stores the teams and scores for a Game
If the home team has a higher score than the away team, then the home team is the winner of this Game.
 
Method Summary
 int getAwayScore()
          Returns the score for the away team in this Game
 java.lang.String getAwayTeam()
          Returns the away team for this Game
 int getHomeScore()
          Returns the score for the home team in this Game
 java.lang.String getHomeTeam()
          Returns the home team for this Game
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Game

public Game(java.lang.String homeTeam,
java.lang.String awayTeam,
int homeScore,
int awayScore)
Creates an object that stores the teams and scores for a Game
If the home team has a higher score than the away team, then the home team is the winner of this Game.

Parameters:
homeTeam - the home team for this Game
awayTeam - the away team for this Game
homeScore - the score for the home team in this Game
awayScore - the score for the away team in this Game
Method Detail

getHomeTeam

public java.lang.String getHomeTeam()
Returns the home team for this Game

Returns:
the home team

getAwayTeam

public java.lang.String getAwayTeam()
Returns the away team for this Game

Returns:
the away team

getHomeScore

public int getHomeScore()
Returns the score for the home team in this Game

Returns:
the score for the home team

getAwayScore

public int getAwayScore()
Returns the score for the away team in this Game

Returns:
the score for the away team