#include #include #include "Account.h" #include "CheckingAccount.h" using std::cout; using std::endl; using std::string; // display the header and then the account details void displayAccount( Account acct, string header ){ cout << header << endl; acct.display(); cout << endl; } int main(){ Account firstHome( 1234.56 ); CheckingAccount gasMoney( 78.90); // Note: passing derived classes in the place of the base class displayAccount( firstHome, "Generic account:"); displayAccount( gasMoney, "Checking account:"); firstHome.deposit( 987.65); gasMoney.deposit( 12.34); firstHome.withdraw( 2000.00); int checkNumber = 234; gasMoney.processCheck( 55.55, checkNumber); cout << "Generic account: (after transactions)" << endl; firstHome.display(); cout << endl; cout << "Checking account: (after transactions)" << endl; gasMoney.display(); cout << endl; return 0; }