forked from Amitlevizky2/Restaurant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Customer.h
88 lines (73 loc) · 1.85 KB
/
Customer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//
// Created by Amit Levizky on 11/3/18.
//
#ifndef CUSTOMER_H_
#define CUSTOMER_H_
#include <vector>
#include <string>
#include "Dish.h"
class Customer{
public:
Customer(std::string c_name, int c_id);
virtual ~Customer() = default;
virtual std::vector<int> order(const std::vector<Dish> &menu)=0;
virtual std::string toString() const = 0;
std::string getName() const;
int getId() const;
virtual Customer* clone() = 0;
private:
const std::string name;
const int id;
};
class VegetarianCustomer : public Customer {
public:
VegetarianCustomer(std::string name, int id);
virtual ~VegetarianCustomer() = default;
std::vector<int> order(const std::vector<Dish> &menu);
std::string toString() const;
Customer* clone();
private:
int mstExpBvg;
int smllstIdVeg;
bool findAndLeg;
};
class CheapCustomer : public Customer {
public:
CheapCustomer(std::string name, int id);
virtual ~CheapCustomer() = default;
std::vector<int> order(const std::vector<Dish> &menu);
std::string toString() const;
Customer* clone();
private:
bool ordered;
int cheapest;
};
class SpicyCustomer : public Customer {
public:
SpicyCustomer(std::string name, int id);
virtual ~SpicyCustomer() = default;
std::vector<int> order(const std::vector<Dish> &menu);
std::string toString() const;
Customer* clone();
private:
int spcMstExpInx;
int spcPrice;
int bvgMstChpstInx;
int bvgPrice;
bool ordered;
};
class AlchoholicCustomer : public Customer {
public:
AlchoholicCustomer(std::string name, int id);
virtual ~AlchoholicCustomer() = default;
std::vector<int> order(const std::vector<Dish> &menu);
std::string toString() const;
Customer* clone();
private:
int maxAlc;
int maxInx;
int minAlc;
int minInx;
bool ordered;
};
#endif //CUSTOMER_H_