#include #include "Account.H" #include "JointAccount.H" #include "FreeChecking.H" #include "JtFrChecking.H" int Transfer (float amt, Account& from, Account& to) { int flag = from.Withdraw (amt); if ( flag != -1 ) { to.Deposit (amt); } return (flag); } void Show (Account** a, int n) { for (int i = 0; i < n; i++) { a[i]->Display(); cout << endl; delete a[i]; } } void main() { JtFrChecking *jfc = new JtFrChecking (13456, 750.0, "025-72-5555", "024-88-3333"); JointAccount *ja = new JointAccount (15123, 1600.0, "043-12-4444", "034-21-2222"); FreeChecking *fc = new FreeChecking (16432, 600.0, "098-02-1111"); Transfer (300, *fc, *jfc); fc->ChargeFee(); Transfer(200, *ja, *fc); Account* acnt[3]; acnt[0] = jfc; acnt[1] = ja; acnt[2] = fc; Show (acnt, 3); }