package cn.edu.bjut.chapter4; public class DebitCard extends Card { public DebitCard(String accountNumber, double balance) { super(accountNumber, balance); } @Override public boolean draw(double money) { if (balance < money) { return false; } balance -= money; return true; } }