#include #include "acc.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; } } int main() { JtFrChecking jfc(23456, 750.0, "025-72-5555", "024-88-3333"); JointAccount ja(55123, 1600.0, "043-12-4444", "034-21-2222"); FreeChecking fc(66432, 600.0, "098-02-1111"); transfer(300, fc, jfc); fc.fee(); transfer(200, ja, fc); Account* acnt[3]; acnt[0] = &jfc; acnt[1] = &ja; acnt[2] = &fc; show(acnt, 3); }