java编程,各位高手,越简单越好。
声明银行账户类,成员变量包括账号、储户姓名、开户时间、身份证号码、存款余额等账户信息,成员方法包括开户、存款、查询、(余额、明细)销户等操作。...
声明银行账户类,成员变量包括账号、储户姓名、开户时间、身份证号码、存款余额等账户信息,成员方法包括开户、存款、查询、(余额、明细)
销户等操作。 展开
销户等操作。 展开
展开全部
public class Account{
private String acctNumber;
private String customerName;
private String acctOpenTime;
private String customerIdNum;
private double balance;
public Account(String accoutnNumber){
this.acctNumber = accoutnNumber;
}
public Account openAccount(String accountNumber){
return new Account(accountNumber);
}
public void save(double money){
this.balance += money;
}
public void query(){
System.out.println("Balance is: " + balance);
//....
}
}
private String acctNumber;
private String customerName;
private String acctOpenTime;
private String customerIdNum;
private double balance;
public Account(String accoutnNumber){
this.acctNumber = accoutnNumber;
}
public Account openAccount(String accountNumber){
return new Account(accountNumber);
}
public void save(double money){
this.balance += money;
}
public void query(){
System.out.println("Balance is: " + balance);
//....
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询