#include "stdstuff.h" #include "Date.h" class Customer { private: int id; // customer id (1 to 1000) double total; // customer total (greater than or equal to 0) Date purchDate; // customer purchase date (in 2000 thru 2015) String2002 custName; // customer name (1 to 20 characters, spaces and special characters // allowed) public: // Your method prototypes go here. Remember to describe each method (i.e. comments!) // and use "const" where appropriate. // the constructor creates a customer with id 10, total 0, date 1 1 2011 and name // "default" Customer(); // constructor creates a customer with the fields provided; sets the customer to the // default and quits if any field is not within the bounds listed above Customer(int id, double total, const Date &purchase, const String2002 &name); // returns the customer id int getID() const; // returns the customer total double getTotal() const; // returns the customer purchase date Date getDate() const; // returns the customer name String2002 getName() const; // sets the customer id to the value given; quits if value not between 1 and 1000 void setID(int nId); // sets the customer total to the value given; quits if value < 0 void setTotal(double nTotal); // sets the customer purchase date to the value given; quits if between 2000 and 2015 void setDate(const Date &nDate); // sets the customer name to the value given; quits if not in range 1 to 20 characters void setName(const String2002 &nName); // returns true if two customers are equal (i.e. their ids are equal), false otherwise bool operator==(const Customer &otherCust) const; // returns true if this customer is less than otherCust (i.e. this customer id is less // than otherCust's id), false otherwise bool operator<(const Customer &otherCust) const; // prints the customer information on two lines; total to 2 decimal places // and customer purchase date and name on the second line void print() const; };