ATM系统
题目
![如如](https://i-blog.csdnimg.cn/blog_migrate/d289257ebed68c996d7042dd7d2d3c5f.png)
封装类
ATM类
package com.cpd.atmTest.entity;
import com.cpd.atmTest.entity.Card;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class Atm {
private String name;
private String num;
private boolean type;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getNum() {
return num;
}
public void setNum(String num) {
this.num = num;
}
public boolean isType() {
return type;
}
public void setType(boolean type) {
this.type = type;
}
}
Card类
package com.cpd.atmTest.entity;
public class Card {
private String account;
private String password;
private double balance;
private String bankName;
private String name;
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public double getBalance() {
return balance;
}
public void setBalance(double balance) {
this.balance = balance;
}
public String getBankName() {
return bankName;
}
public void setBankName(String bankName) {
this.bankName = bankName;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Card(String account, String password, double balance, String bankName, String name) {
this.account = account;
this.password = password;
this.balance = balance;
this.bankName = bankName;
this.name = name;
}
public Card() {
}
@Override
public String toString() {
return "Card{" +
"account='" + account + '\'' +
", password='" + password + '\'' +
", balance=" + balance +
", bankName='" + bankName + '\'' +
", name='" + name + '\'' +
'}';
}
}
ATM的接口方法
package com.cpd.atmTest.dao;
import com.cpd.atmTest.entity.Card;
public interface AtmDao {
public void