/** A tennis player. */
public class Player {
 
  /** The player's name. */
  private String name;
  
  /** The number of wins. */
  private int wins;
  
  /** The number of losses. */
  private int losses;
  
  /** The total number of players. */
  private static int numPlayers;
  
  /** 
   * Create a player with the name n. 
   */
  public Player(String n) {
    name = n;
    numPlayers++;
  }
  
  /**
   * Increase the number of wins.
   */
  public void won() {
    wins++;
  }
  
  /**
   * Increase the number of losses.
   */
  public void lost() {
    losses++;
  }
  
  /**
   * Return the number of wins.
   */
  public int getWins() {
    return wins;
  }
  
  /**
   * Return the total number of players.
   */
  public static int getNumPlayers() {
    return numPlayers;
  }
  
  /**
   * Return a String representation of the
   * player.
   */
  public String toString() {
    return name + " Wins: " + wins 
      + " Losses: " + losses; 
  }
  
}
