account.java
来自「基于netbeans环境开发的银行帐户管理系统. 主要是用swing组件,不适」· Java 代码 · 共 54 行
JAVA
54 行
/*
* Account.java
*
* Created on 2006年9月27日, 上午10:32
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package account2;
/**
*
* @author Administrator
*/
public class Account {
private String Customer_name;
private double balance;
private static int account_ID = 1;
private int account_id;
/** Creates a new instance of Account */
public Account(String name) {
this.Customer_name = name;
balance = 0;
this.account_id =(int) account_ID;
account_ID = account_ID+1;
}
public void setBalace(double money){
this.balance = this.balance + money;
}
public boolean subBalace(double money){
double temp = this.balance;
this.balance = this.balance - money;
if(this.balance<0){this.balance = temp;
return false;
}
else return true;
}
public String getCustomer_name(){
return Customer_name;
}
public int getAccount_id(){
return account_id;
}
public double getBalance(){
return this.balance;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?