CustomerDB - #include"stdstuff.h#include"Date.h c class...

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 CustomerDB { c private: // "customer" is the struct containing the customer information // it is made up of id (an integer) and total (a double) struct customer{ int id; double total; Date purchDate; String2002 custName; }; 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)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the 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

CustomerDB - #include"stdstuff.h#include"Date.h c class...

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