+/EE312

software design

git clone https://git.julia.blue/+/EE312

Joseph RyanProject 76241299

master
874 B32 linesraw
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:
11    Customer* data; // an array of Customer objects (allocated on the heap)
12    int capacity; // size of the array on the heap
13    int length; // number of valid customers actually in the array
14
15public:
16    CustomerDB(void);
17    ~CustomerDB(void);
18    int size(void);
19    Customer &operator[](int
20                         k); // we can access the customer database like an array
21    Customer &operator[](String
22                         name); // we can also lookup a customer directly using his/her name
23    bool isMember(String name);
24    void clear(void);
25};
26
27void processPurchase(void);
28void processInventory(void);
29void processSummarize(void);
30void reset(void);
31
32#endif /* _CustomerDB_h */