package com_5_9_bank;
public interface Union {
double saveMoney(double moneyCount);
void getMoney(double taste_money);
boolean checkPwdOrUser(String user, String pwd);
String Verification_Code();
}
package com_5_9_bank;
public interface CCB_Bank extends Union {
double saveMoney(double moneyCount);
void getMoney(double taste_money);
boolean checkPwdOrUser(String user, String pwd);
String Verification_Code();
}
package com_5_9_bank;
public class Card {
double money;
String user = "zhangsan";//定义了账号密码
String pwd = "1234";
}
package com_5_9_bank;
import java.util.Random;
public class ATM implements CCB_Bank {
Card c;
public boolean checkPwdOrUser(String user, String pwd) {
if ((c.user.equals(user)) && (c.pwd.equals(pwd))) {
return true;