/* * Created on Jun 25, 2004 */ package baseball2; /* You are looing at the PROJECT 3 (baseball2) version! */ /** Information about an entire collection of baseball2 teams. *
In addition to the methods specified here, the class should * provide a constructor which takes one parameter, a file identifier. * The file is expected to contain information about teams. * @author dickey */ public interface ILeague { /** Read player information from a file and remember it. * * @param fileID identifier (local name or URL) of a file containing * information about players who are hitters. * @return the number of players added. */ public int addHitterInformation(String fileID); /** Read player information from a file and remember it. * * @param fileID identifier (local name or URL) of a file containing * information about players who are pitchers. * @return the number of players added. */ public int addPitcherInformation(String fileID); /** Print the teams in order, one per line. */ public void printTeams(); /** Print all the players in order, one per line. */ public void printPlayers(); /** Print in order, one per line, the players who play for * the given team. * @param teamName the name of a team. The name should treated * case-insensitively. */ public void printPlayers(String teamName); /** List players in descending order of "value" * (in baseball terms). * We define value as folows: all pitchers are more valuable than any hitter. * Within the hitter category, value is determined by batting average * (higher is better). * Among pitchers, value is determined by ERA (lower is better). */ public void printMVPList(); /**List all players (except pitchers), * in order of their positions. * The positions should be in alphabetical order by position codes. * Within a given position, * list the players in alphabetical order (in the usual way). */ public void printAllStarBallot(); }