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

📄 customer.java

📁 this is a trade sale system realized by java. It can run some easy functions and has a good design p
💻 JAVA
字号:
package trader;
import java.io.Serializable;
public class Customer implements Serializable{
  private String id;
  private String name;
  private String addr;

  // Constructors
  public Customer(String id, String name, String addr){
    this.id = id;
    this.name = name;
    this.addr = addr;
  }

  public Customer(String id){
    this (id, null, null);
  }

  public Customer(){
    this (null, null, null);
  }

  // Accesser methods
  public String getId(){
    return id;
  }

  public String getName(){
    return name;
  }

  public String getAddr(){
    return addr;
  }

  // Mutator methods - note you cannot change the id
  public void setName(String newName){
    name = newName;
  }

  public void setAddr(String newAddr){
    addr = newAddr;
  }

  public String toString() {
    return "Customer:  " + id + "  " + name + "  " + addr;
  }
}

⌨️ 快捷键说明

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