-
Notifications
You must be signed in to change notification settings - Fork 0
/
subscriber.cpp
90 lines (85 loc) · 1.69 KB
/
subscriber.cpp
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
89
#include "subscriber.h"
using namespace std;
Subscriber::Subscriber()
{
this->id = -1;
this->type = false;
this->name = "N/A";
this->address = "N/A";
this->phone = 0;
this->email = "N/A";
}
Subscriber::Subscriber(int id,string name,bool type,string address,unsigned long int phone,string email)
{
this->id = id;
this->type = type;
this->name = name;
this->address = address;
this->phone = phone;
this->email = email;
}
void Subscriber::updateSubscriber(int id,string name,bool type,string address,unsigned long int phone,string email)
{
this->id = id;
this->type = type;
this->name = name;
this->address = address;
this->phone = phone;
this->email = email;
}
//=========getters========
Subscriber& Subscriber::setId(int ID)
{
this->id = ID;
return *this;
}
Subscriber& Subscriber::setType(bool TYPE)
{
this->type = TYPE;
return *this;
}
Subscriber& Subscriber::setName(string Name)
{
this->name = Name;
return *this;
}
Subscriber& Subscriber::setAddress(string Address)
{
this->address = Address;
return *this;
}
Subscriber& Subscriber::setPhone(unsigned long int Phone)
{
this->phone = Phone;
return *this;
}
Subscriber& Subscriber::setEmail(string Email)
{
this->email = Email;
return *this;
}
//=======setters========
int Subscriber::getId() const
{
return this->id;
}
bool Subscriber::getType() const
{
return this->type;
}
string Subscriber::getName() const
{
return this->name;
}
string Subscriber::getAddress() const
{
return this->address;
}
unsigned long int Subscriber::getPhone() const
{
return this->phone;
}
string Subscriber::getEmail() const
{
return this->email;
}