Customer - successful false otherwise(customer does not...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
#include "stdstuff.h" #include "Date.h" # class Customer { c 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) c 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(); Customer (int id, double total, const Date &purchase, const String2002 &name); int getID () const; double getTotal () const; Date getDate () const; String2002 getName () const; void print() const; // change the customer number of an existing customer; returns true if
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: successful, // false otherwise (customer does not exist, or new customer id in use) bool setID(int id, int newid); // change the customer total of an existing customer; returns true if successful, // false otherwise (customer does not exist) bool setTotal(int id, double newtotal); // move the purchase date by the number of days given; returns true if successful, // false otherwise (customer does not exist) bool setDate(int id, int numDays); // append the given String2002 to the customer name; returns true if successful, // false otherwise (customer does not exist) bool setName(int id, const String2002 &add); // returns the highest total of all customers // (returns -1 if there are no customers in the database) }; }...
View Full Document

This note was uploaded on 03/13/2011 for the course SYSC 2002 taught by Professor Unknown during the Spring '07 term at Carleton.

Page1 / 2

Customer - successful false otherwise(customer does not...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online