该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
public CheckingAccount(double bal, double protect)
public CheckingAccount(double bal) //bal:初时账户余额,protect:透支额度
d)类CheckingAccount必须覆盖父类withdraw 方法。实现以下功能:如果余额足够取,按正常方式取钱,否则将判断透支是否超过额度,超过不能取,没超过可以正常取钱。并返回boolean型变量。
3)SavingsAccount类(储蓄卡帐户)
a)SavingsAccount类为Account的子类
b)属性interestRate为利率
c)含有两个参数的构造器,注意必需要调用父类的一个参数的构造器。
public SavingsAccount(double bal, double rate) //bal:账户余额//rate 利率
4)Customer类
a)声明四个属性: firstName, lastName,numberOfAccounts and accounts数组
b)声明2个参数的构造器 (f and l) 给属性赋初值
c)declare two public accessors for the object attributes; these methods getFirstName and getLastName simply return the appropriate attribute
d)声明setAccount方法赋帐号
e)其余参考UML图
5) Bank类
参考UML图
6)TestBanking类[1]