#include "stdstuff.h" // #include "Date.h" moved to Customer.h #include "Customer.h" class CustomerDB { private: // customer struct replaced by Customer class enum {MAXCUST=100}; // another way of declaring an int const // Hint: make MAXCUST much smaller to test filling the database // the old fields of the customerDB struct are now fields in our class Customer ci[MAXCUST]; // the array of customer information int numCusts; // the number of customers currently in the database public: // Your methods go here. Remember to describe each method (i.e. comments!) // and use "const" where appropriate. // the constructor creates an empty database CustomerDB(); // returns the number of customers in the database int getNumCusts() const; // add a new customer to the database; returns true if successful, false otherwise // (database full or customer already exists) bool add(const Customer &newCust); // remove a customer from the database; returns true if successful, false otherwise (customer // does not exist) bool remove(int id); // prints the full customer database (or a note if the database is empty) // Customers are printed one per two lines, with 2 decimals for the total. void print() const; // change the customer number of an existing customer; returns true if successful, // false otherwise (customer does not exist, or new customer id in use) bool changeID(int id, int nid); // change the customer total of an existing customer; returns true if successful, // false otherwise (customer does not exist) bool changeTotal(int id, double ntotal); // move the purchase date by the number of days given; returns true if successful, // false otherwise (customer does not exist) bool moveDate(int id, int days); // append the given String2002 to the customer name; returns true if successful, // false otherwise (customer does not exist) bool appendName(int id, const String2002 &add); // returns the lowest customer ID of all customers // (returns -1 if there are no customers in the database) int getLowestID() const; // returns the highest total of all customers // (returns -1 if there are no customers in the database) double getBestTotal() const; // prints (to cout) the earliest purchase date of all customers // (prints 1 1 1900 if there are no customers in the database) void outputFirstDate() const; // returns the customer name that's first in case insensitive alphabetical order // (returns "" if there are no customers in the database) String2002 getFirstName() const; };