0% found this document useful (0 votes)
11 views2 pages

Clsperson H

Uploaded by

abdo djahra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Clsperson H

Uploaded by

abdo djahra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

#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;
}

};

You might also like