-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomer.cpp
More file actions
46 lines (37 loc) · 764 Bytes
/
Customer.cpp
File metadata and controls
46 lines (37 loc) · 764 Bytes
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
#include "Customer.h"
//constructors
Customer::Customer() {
name = "";
address = "";
phoneNum = 0;
}
Customer::Customer(string n, string a, long long p) {
name = n;
address = a;
phoneNum = p;
}
//getters
string Customer::getName() {
return name;
}
string Customer::getAddress() {
return address;
}
long long Customer::getPhoneNum() {
return phoneNum;
}
//setters
void Customer::setName(string n) {
name = n;
}
void Customer::setAddress(string a) {
address = a;
}
void Customer::setPhoneNum(long long p) {
phoneNum = p;
}
//ostream overload
ostream & operator << (ostream &out, Customer &c){
out << "Name: " + c.name << endl << "Address: " + c.address << endl << "Phone Number: " + to_string(c.phoneNum) << endl;
return out;
}