📄 account.java
字号:
/**
*
*/
package com.hp.gdcc.training.homework39;
/**
* @author yanshuo
*
*/
public class Account {
/**
* 账户号码
*/
private long id;
/**
* 账户密码
*/
private String password;
/**
* 真实姓名
*/
private String name;
/**
* 身份证号码
*/
private String personId;
/**
* 客户的电子邮箱
*/
private String email;
/**
* 账户余额
*/
private double balance;
/**
* 帐户类型
*/
private int accountType;
/**
* 构造方法
*/
public Account() {
}
/**
* @param id
*
* 有参的构造方法。用于设置必要的属性
*/
public Account(long id, String password, String name, String personId,
String email, int accountType) {
this.id = id;
this.password = password;
this.name = name;
this.personId = personId;
this.email = email;
this.accountType = accountType;
}
/**
* 存款方法
*/
public boolean deposit(double depositAmount) {
this.balance += depositAmount;
return true;
}
/**
* 取款方法
*/
public boolean withdraw(double withdrawAmount) {
// extends class TODO;
return true;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPersonId() {
return personId;
}
public void setPersonId(String personId) {
this.personId = personId;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public double getBalance() {
return balance;
}
public void setBalance(double balance) {
this.balance = balance;
}
public int getAccountType() {
return accountType;
}
public void setAccountType(int accountType) {
this.accountType = accountType;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -