+/EE312
software design
git clone https://git.julia.blue/+/EE312
6241299
master
1#ifndef _CustomerDB_h 2#define _CustomerDB_h 3 4#include "String.h" 5#include "Customer.h" 6 7typedef Customer * CustomerPtr ; 8 9class CustomerDB { 10private : 11Customer * data ;// an array of Customer objects (allocated on the heap) 12int capacity ;// size of the array on the heap 13int length ;// number of valid customers actually in the array 14 15public : 16CustomerDB (void ); 17 ~CustomerDB (void ); 18int size (void ); 19Customer & operator [](int 20k); // we can access the customer database like an array 21Customer & operator[](String 22name); // we can also lookup a customer directly using his/her name 23bool isMember ( String name); 24void clear ( void ); 25}; 26 27void processPurchase ( void ); 28void processInventory ( void ); 29void processSummarize ( void ); 30void reset ( void ); 31 32#endif /* _CustomerDB_h */