customer.h
#ifndef CUSTOMER_H
#define CUSTOMER_H
#include <string>
#include <cstdlib>
using namespace std;
const int MAX_PURCHS = 20;
const int MIN_MONEY = 4, MAX_MONEY = 250;
class Customer
{
private:
string m_purch[MAX_PURCHS];
string m_name;
float m_money;
short m_num_purch;
public:
Customer(): m_num_purch(0), m_name("JimBob")
{m_money = rand() % (MAX_MONEY - MIN_MONEY) + MIN_MONEY;}
Customer(const string name, const float money):
m_num_purch(0), m_name(name), m_money(money) {}
bool purchase(const string toBuy);
string getName() const {return m_name;}
float getMoney() const {return m_money;}
float modMoney(const float money) {return m_money += money;}
float setMoney(const float money) {return m_money = money;}
void print() const;
};
#endif