#include "stdstuff.h" #include "CustomerDB.h" // the constructor creates an empty database CustomerDB::CustomerDB() { numCusts=0; // no customer yet (so nothing goes in the ci array) } // returns the number of customers in the database int CustomerDB::getNumCusts() const { return numCusts; } // add a new customer to the database; returns true if successful, false otherwise // (database full or customer already exists) bool CustomerDB::add(const Customer &newCust) { if(numCusts==MAXCUST) return false; // database is full 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