-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphoneBookEntry.cpp
60 lines (50 loc) · 1.19 KB
/
phoneBookEntry.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
//
// Created by SpeedyNS on 10/12/2019.
//
#include <iostream>
#include "phoneBookEntry.h"
phoneBookEntry::phoneBookEntry()
{
entryName = "";
entryPhoneNumber = "";
entryEmail = "";
}
phoneBookEntry::phoneBookEntry(const std::string &name, const std::string &number)
{
entryName = name;
entryPhoneNumber = number;
entryEmail = "";
}
phoneBookEntry::phoneBookEntry(const std::string &name, const std::string &number, const std::string &email)
{
entryName = name;
entryPhoneNumber = number;
entryEmail = email;
}
//Copy Constructor
phoneBookEntry::phoneBookEntry(const phoneBookEntry &from)
{
entryName = from.entryName;
entryPhoneNumber = from.entryPhoneNumber;
entryEmail = from.entryEmail;
}
std::string phoneBookEntry::name() const
{
return entryName;
}
std::string phoneBookEntry::phoneNumber() const
{
return entryPhoneNumber;
}
std::string phoneBookEntry::email() const
{
return entryEmail;
}
void phoneBookEntry::phoneNumber(const std::string &newNumber)
{
entryPhoneNumber = newNumber;
}
void phoneBookEntry::email(const std::string &newEmail)
{
entryEmail = newEmail;
}