-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsalesman.h
More file actions
71 lines (44 loc) · 1.7 KB
/
salesman.h
File metadata and controls
71 lines (44 loc) · 1.7 KB
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
#ifndef SALESMAN_H
#define SALESMAN_H
#include <iostream>
#include <vector>
#include "person.h"
#include "person_col.h"
#include "customer.h"
using namespace std;
//Class Salesman - inherits from class Person
//Contains private variables: departments, permissions, experience, customer
class Salesman : public Person {
public:
Salesman(string name, string surname, unsigned int cardId, string permissions, unsigned int experience,
vector<string> departments);
Salesman() {};
bool check_if_same(const Salesman &obj, const Salesman &obj2) const;
unsigned int display_experience() const { return experience; }
//getters for variables
string get_permissions() const { return permissions; }
vector<string> get_departments() { return departments; }
Customer &get_customer() { return customer; }
string to_string() const;
void display_departments();
//setters for variables
void set_permissions(string new_permissions);
void set_experience(unsigned int new_experience);
void set_customer(Customer &new_customer);
void add_department(string new_department);
void replace_departments(vector<string> new_list);
void remove_department(string department);
void add_book_to_basket(Book &book);
void add_book_to_ordered_books(Book &book);
//operators overloading
Salesman &operator=(const Salesman &obj);
friend bool operator==(const Salesman &obj, const Salesman &obj2);
friend bool operator!=(const Salesman &obj, const Salesman &obj2);
friend ostream &operator<<(ostream &output, const Salesman &obj);
private:
vector<string> departments;
string permissions;
unsigned int experience;
Customer customer;
};
#endif