-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclsPerson.h
86 lines (68 loc) · 1.45 KB
/
clsPerson.h
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
#pragma once
#include <iostream>
#include <string>
using namespace std;
class clsPerson
{
private:
string _FirstName;
string _LastName;
string _Email;
string _Phone;
public:
clsPerson(string FirstName, string LastName, string Email, string Phone)
{
_FirstName = FirstName;
_LastName = LastName;
_Email = Email;
_Phone = Phone;
}
//Property Set
void SetFirstName(string FirstName)
{
_FirstName = FirstName;
}
//Property Get
string GetFirstName()
{
return _FirstName;
}
__declspec(property(get = GetFirstName, put = SetFirstName)) string FirstName;
//Property Set
void SetLastName(string LastName)
{
_LastName = LastName;
}
//Property Get
string GetLastName()
{
return _LastName;
}
__declspec(property(get = GetLastName, put = SetLastName)) string LastName;
//Property Set
void SetEmail(string Email)
{
_Email = Email;
}
//Property Get
string GetEmail()
{
return _Email;
}
__declspec(property(get = GetEmail, put = SetEmail)) string Email;
//Property Set
void SetPhone(string Phone)
{
_Phone = Phone;
}
//Property Get
string GetPhone()
{
return _Phone;
}
__declspec(property(get = GetPhone, put = SetPhone)) string Phone;
string FullName()
{
return _FirstName + " " + _LastName;
}
};