// Account.h // Account class definition. Represents a bank account. #ifndef ACCOUNT_H #define ACCOUNT_H class Account { public: Account( int, int, double, double ); // constructor sets attributes bool validatePIN( int ) const; // is user-specified PIN correct? double getAvailableBalance() const; // returns available balance double getTotalBalance() const; // returns total balance void credit( double ); // adds an amount to the Account balance void debit( double ); // subtracts an amount from the Account balance int getAccountNumber() const; // returns account number private: int accountNumber; // account number int pin; // PIN for authentication double availableBalance; // funds available for withdrawal double totalBalance; // funds available + funds waiting to clear }; // end class Account #endif // ACCOUNT_H /************************************************************************** * (C) Copyright 1992-2005 by Deitel & Associates, Inc. and * * Pearson Education, Inc. All Rights Reserved. * * * * DISCLAIMER: The authors and publisher of this book have used their * * best efforts in preparing the book. These efforts include the * * development, research, and testing of the theories and programs * * to determine their effectiveness. The authors and publisher make * * no warranty of any kind, expressed or implied, with regard to these * * programs or to the documentation contained in these books. The authors * * and publisher shall not be liable in any event for incidental or * * consequential damages in connection with, or arising out of, the * * furnishing, performance, or use of these programs. * **************************************************************************/