CPP   97

accountpair.h

Guest on 22nd September 2021 03:59:01 PM

  1. //-----------------------------------------------------------------
  2. // Filename:  accountpair.h
  3. // Author:    Susan Gauch
  4. // Purpose:   The header file for a pair of bank accounts.
  5. //-----------------------------------------------------------------
  6.  
  7. #include "account.h"
  8.  
  9. class AccountPair
  10. {
  11. public:
  12.    // default constructor
  13.    AccountPair( const int SAmount = 0, const int CAmount = 0);
  14.    AccountPair(const  AccountPair &accountpr );    // copy constructor
  15.    ~AccountPair();                                 // destructor
  16.    Account GetSavings() const;   // return the savings balance
  17.    Account GetChecking() const;  // return the checking balance
  18.    void UpdateSavings( const int Amount );     // add/subtract from savings
  19.    void UpdateChecking( const int Amount );    // add/subtract from checking
  20.    void Print() const;                   // print the balances
  21.    void AddInterest(const float SPerc, const float CPerc ); // add interest
  22. private:
  23.    Account savings;
  24.    Account checking;  
  25. };

Raw Paste


Login or Register to edit or fork this paste. It's free.