home *** CD-ROM | disk | FTP | other *** search
/ Learn Java Now / Learn_Java_Now_Microsoft_1996.iso / JavaNow / Code / Chap07 / BankAccount / SavingsAccount.class (.txt) < prev    next >
Encoding:
Java Class File  |  1996-07-29  |  712 b   |  21 lines

  1. class SavingsAccount extends BankAccount {
  2.    private static int m_nNextAccountNo = 100001;
  3.    private int nAccountNo;
  4.  
  5.    public int AccountNo() {
  6.       return this.nAccountNo;
  7.    }
  8.  
  9.    SavingsAccount(double dInitialBalance) {
  10.       super(dInitialBalance);
  11.       this.nAccountNo = m_nNextAccountNo++;
  12.    }
  13.  
  14.    public void Fee() {
  15.       if (((BankAccount)this).Balance() < (double)200.0F) {
  16.          super.Fee();
  17.       }
  18.  
  19.    }
  20. }
  21.