#include "stdstuff.h" #include "CustomerDB.h" // private method to delete database; used by destructor and assignment void CustomerDB::deleteDB() { if (numCusts>0) delete [] ci; // delete the dynamically allocated array } // private method to copy database; used by copy constructor and assignment void CustomerDB::copyDB(const CustomerDB &otherCustDB) { numCusts = otherCustDB.numCusts; // set number of customers if(numCusts==0) ci = NULL; else { // if at least one customer, create and copy over the array ci = new Customer[numCusts]; for (int i=0;imaxtotal) // use getTotal maxtotal=ci[i].getTotal(); // **must** use getTotal } return maxtotal; } // prints (to cout) the earliest purchase date of all customers // (prints 31 12 2099 if there are no customers in the database) void CustomerDB::outputFirstDate() const { Date max(31,12,2099); cout << "The first purchase date is: "; for (int i=0; i