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

📄 account.java

📁 基于netbeans环境开发的银行帐户管理系统. 主要是用swing组件,不适合高手下载!!
💻 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 + -