java实现简单银行管理系统实现简单银行管理系统
主要为大家详细介绍了java实现简单银行管理系统,文中示例代码介绍的非常详细,具有一定的参考价值,感兴
趣的小伙伴们可以参考一下
本文实例为大家分享了java银行管理系统的具体代码,供大家参考,具体内容如下
账户类
package Account;
public abstract class Account {
private int id;//账号
private String password;//密码
private String name;//姓名
private String personId;//身份证号码
private String email;//邮箱
private double ceiling;//贷款属性
private static double balance;//账户余额
public Account() {}
public Account(int id, String password, String name, String personId,
String email, double balance,double ceiling) {
super();
this.id = id;
this.password = password;
this.name = name;
this.personId = personId;
this.email = email;
this.balance = balance;
this.ceiling = ceiling;
}
public Account(int id, String password, String name, String personId,
String email) {
super();
this.id = id;
this.password = password;
this.name = name;
this.personId = personId;
this.email = email;
}
public Account(int id, String password) {
this.id =id;
this.password = password;
}
//开户函数
public Account openAccount() {
return null;
}
//显示开户成功的信息函数
public void show() {
System.out.println("账户ID为 : " + id + "密码为: " + password + "姓名为: " + name + "身份证号码为: " + personId + "邮箱为: " + email);
}
//登入函数
public void enter() {
}
//取款方法 为抽象方法
public abstract void deposit(double money);
//存款方法
public static void withdraw(double money) {
balance = balance + money;
System.out.println("您已经存入" + money + "元,账户余额为" + balance );
}
// public abstract void requestLoan(double money);
public double getCeiling() {
return ceiling;
}
public void setCeiling(double ceiling) {
this.ceiling = ceiling;
}
public int getId() {
return id;