⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 player.java

📁 This project does not contain a full, runnable application program. Instead, the only package ope.fo
💻 JAVA
字号:
package ope.football;


/**
 * The class <CODE>Player</CODE> represents football players
 * in a match statistics program. Only some very basic information
 * for each player is recorded.
 * <P>
 * A player object is immutable after creation; transferring a player
 * between clubs is not directly supported by this class, for instance.
 */
public class Player {

  private String name;			// fixed value
  private Club employer;		// fixed value
  

  /**
   * Creates a new player with the given basic attributes.
   * 
   * @param name the name of the player
   * @param employer the club the player plays for
   */
  public Player(String name, Club employer) {
    this.name = name;
    this.employer = employer;
  }
  

  /**
   * Returns the player's name.
   * 
   * @return player name
   */
  public String getName() {
    return this.name;
  }
  

  /**
   * Returns the player's employer club.
   *
   * @return employer
   */
  public Club getEmployer() {
    return this.employer;
  }
  
  
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -