A.3. The Game Class

 // Game.java package nfl.original; /** This class represents a game that has been played. */ public class Game { private static Teams teams = Teams.getHandle(); // Home team for this game private String home; /** Returns the full name of the home team for this game */ public String getHome() {return home; } /** Sets the name of the Home team for the game. If only * a partial name is provided, the full name is looked * up and set */ public void setHome(String home) { // Validate & get full name if partial was provided this.home = (String) teams.findName(home); } // Visiting team for this game private String visitor; /** Returns the full name of the visiting team for this * game */ public String getVisitor() {return visitor; ...

Get J2EE™ and JAX™: Developing Web Applications and Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.