public class Transation { private String tranType; // 定义交易类型
private String tranAccount; // 定义交易账号
private double tranAmount; // 定义交易金额 public Transation(String tranType, String tranAccount, double tranAmount) { // 定义构造函数
this.tranAccount = tranAccount;
this.tranAmount = tranAmount;
this.tranType = tranType;
} //定义得到和设置属性的方法
public String getTranType() {
return tranType;
} public void setTranType(String tranType) {
this.tranType = tranType;
} public String getTranAccount() {
return tranAccount;
} public void setTranAccount(String tranAccount) {
this.tranAccount = tranAccount;
} public double getTranAmount() {
return tranAmount;
} public void setTranAmount(double tranAmount) {
this.tranAmount = tranAmount;
}
}
private String username;
private String password;
private int transtype;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public int getTranstype() {
return transtype;
}
public void setTranstype(int transtype) {
this.transtype = transtype;
}
public Transaction(String username, String password, int transtype) {
super();
this.username = username;
this.password = password;
this.transtype = transtype;
}