public class Team { private String name; // The name of the Team private int wins; // The number of games that the Team won private int losses; // The number of games that the Team lost private int ties; // The number of games that the Team tied public Team(String aName) { this.name = aName; this.wins = 0; this.losses = 0; this.ties = 0; } // Get methods public String getName() { return name; } public int getWins() { return wins; } public int getLosses() { return losses; } public int getTies() { return ties; } // Modifying methods public void recordWin() { wins++; } public void recordLoss() { losses++; } public void recordTie() { ties++; } // Returns a text representation of a team public String toString() { return("The " + this.name + " have " + this.wins + " wins, " + this.losses + " losses and " + this.ties + " ties."); } // Returns the total number of points for the team public int totalPoints() { return (this.wins * 2 + this.ties); } // Returns the total number of games played by the team public int gamesPlayed() { return (this.wins + this.losses + this.ties); } }