club.java

来自「This project does not contain a full, ru」· Java 代码 · 共 47 行

JAVA
47
字号
package ope.football;


/**
 * The class <CODE>Club</CODE> represents football clubs in
 * a match statistics system. Only some very basic information
 * for each club is recorded. A club object is immutable once created.
 */
public class Club {
  
  private String name;					// fixed value
  private int yearFormed;				// fixed value
  

  /**
   * Creates a new club with the given basic information.
   * 
   * @param name				the name of the club
   * @param yearFormed  the year the club was formed
   */
  public Club( String name, int yearFormed) {
    this.name = name;
    this.yearFormed = yearFormed;
  }
  

  /**
   * Returns the name of the club.
   * 
   * @return club name
   */
  public String getName() {
    return this.name;
  }
  

  /**
   * Returns the year the club was formed.
   *
   * @return formation year
   */
  public int getYearFormed() {
    return this.yearFormed;
  }
  
}

⌨️ 快捷键说明

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