/** Program to test the CreditCard Class */ #include "CreditCard.h" // provides CreditCard #include // provide cout using namespace std; // make std accessible int main() { // CreditCard test function cout.precision(2); CreditCard visa("5391 0375 9387 5309", "John Bowman", 2500, 0.0079); visa.chargeIt(32575); visa.chargeIt(80000); visa.chargeIt(10000); visa.processMonth(); cout << endl << "At end of first month:" << endl << visa; visa.chargeIt(22800); visa.makePayment(10000); visa.makePayment(19000); visa.makePayment(1000); visa.processMonth(); cout << endl << "At end of second month:" << endl << visa; visa.processMonth(); cout << endl << "At end of third month:" << endl << visa; visa.makePayment(40000); cout << endl << "After making a payment of $400:" << endl; cout << " Query of current balance reports $" << visa.getCurrentBalance()/100.0 << endl; cout << " Query of past statement balance reports $" << visa.getStatementBalance()/100.0 << endl; visa.chargeIt(50000); visa.makePayment(80000); visa.processMonth(); cout << endl << "At end of fourth month:" << endl << visa; visa.makePayment(47500); visa.processMonth(); cout << endl << "At end of fifth month:" << endl << visa; return 0; }