?? account.java
字號:
/*
* 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 + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -