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

📄 customer.java

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


/**
 * The class <CODE>Customer</CODE> represents customers in a 
 * simple (unrealistic) banking system. Each customer has
 * a fixed customer ID number and a name.
 */
public class Customer {

  private int id;                    // fixed value 
  private String name;               // most-recent holder

  
  /**
   * Creates a new normal customer with the given ID number and
   * name.
   * 
   * @param id   the new customer's ID number
   * @param name the new customer's name
   */  
  public Customer(int id, String name) {
    this.id = id;
    this.name = name;
  }
  

  /**
   * Returns the customer's ID number
   * 
   * @return customer ID
   */  
  public int getID() {
    return this.id;
  }
  
  
  /**
   * Returns the customer's name.
   * 
   * @return customer name
   */  
  public String getName() {
    return this.name;
  }
  
  
  /**
   * Sets the customer's name.
   * 
   * @param newName the name to be set for the customer
   */  
  public void setName(String newName) {
    this.name = newName;
  }
  
  
  
}

⌨️ 快捷键说明

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