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

📄 player.java

📁 使用Servlet和JSP进行Web组件开发
💻 JAVA
字号:
package sl314.model;

/**
 * This domain object represents a player in a sports league.
 * The data attributes are all package-private to allow access to them
 * in the {@link RegisterService} class.
 */
public class Player {

  int objectID;
  String name = "";
  String address = "";
  String city = "";
  String province = "";
  String postalCode = "";

  /**
   * This is the constructor.  It is package-private to prevent
   * misuse.  The {@link RegisterServer} method should be used to
   * create a new player object.
   */
  Player(String name) {
    this(-1, name, "", "", "", "");
  }

  /**
   * This is the full constructor.
   */
  Player(int objectID, String name, String address, String city,
         String province, String postalCode) {
    this.objectID = objectID;
    this.name = name;
    this.address = address;
    this.city = city;
    this.province = province;
    this.postalCode = postalCode;
  }

  public String getName() {
    return name;
  }
  public void setName(String value) {
    name = value;
  }
  public String getAddress() {
    return address;
  }
  public void setAddress(String value) {
    address = value;
  }
  public String getCity() {
    return city;
  }
  public void setCity(String value) {
    city = value;
  }
  public String getProvince() {
    return province;
  }
  public void setProvince(String value) {
    province = value;
  }
  public String getPostalCode() {
    return postalCode;
  }
  public void setPostalCode(String value) {
    postalCode = value;
  }
}

⌨️ 快捷键说明

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