-
Notifications
You must be signed in to change notification settings - Fork 0
/
Customer.cpp
65 lines (54 loc) · 1.26 KB
/
Customer.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
#include "Customer.h"
#include <iostream>
#include <iomanip>
Customer::Customer(){ //privilege assigned statically
id = 0;
name = "No Name";
address = "No Address";
tel = "No Phone Number";
customerType ="NOT SET";
}
Customer::Customer(int cstmrID, string cstmrName, string cstmrAddress, string cstmrTel){ //privilege assigned statically
id = cstmrID;
name = cstmrName;
address = cstmrAddress;
tel = cstmrTel;
customerType = "NOT SET";
}
Customer::Customer(const Customer & CopyCustomer){ //privilege assigned statically
id = CopyCustomer.getId();
name = CopyCustomer.getName();
address = CopyCustomer.getAddress();
tel = CopyCustomer.getTel();
customerType = "NOT SET";
}
Customer::~Customer(){
}
unsigned Customer::getId() const
{
return id;
}
string Customer::getName() const
{
return name;
}
string Customer::getAddress() const
{
return address;
}
string Customer::getTel() const
{
return tel;
}
string Customer::getCarsRented() const{
string carsRented = "";
for (unsigned j = 0; j<carRented.size(); j++){
carsRented +=" ";
carsRented+=to_string(carRented.at(j));
carsRented+=";";
}
return carsRented;
}
void Customer::setCarsRented(int carToAdd){
carRented.push_back(carToAdd);
}