home *** CD-ROM | disk | FTP | other *** search
- class CheckingAccount extends BankAccount {
- private static int m_nNextAccountNo = 800001;
- private int nAccountNo;
-
- public void Interest() {
- if (((BankAccount)this).Balance() > (double)500.0F) {
- super.Interest();
- }
-
- }
-
- CheckingAccount(double dInitialBalance) {
- super(dInitialBalance);
- this.nAccountNo = m_nNextAccountNo++;
- }
-
- public int AccountNo() {
- return this.nAccountNo;
- }
- }
-