-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPerson.cpp
More file actions
62 lines (51 loc) · 1.14 KB
/
Person.cpp
File metadata and controls
62 lines (51 loc) · 1.14 KB
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
/*
* Person.cpp
*
* Created on: 28 oct. 2013
* Author: grosalex
*/
#include "Person.h"
Person::Person() {
string inName, inAddress;
//cout << "Enter birthdate : " << endl;
//Date inDate;
cout << "Enter the name : ";
cin >> inName;
cout << "Enter the address : ";
cin >> inAddress;
//birthdate=inDate;
name=inName;
address=inAddress;
}
Person::Person(string inName, string inAddress, Date inDate) {
birthdate=inDate;
name=inName;
address=inAddress;
}
Person::~Person() {
// TODO !CodeTemplates.destructorstub.tododesc!
}
void Person::print() {
cout << "Name : " << name << endl;
cout << "Address : " <<address << endl;
cout << "Birthdate : ";
birthdate.print();
}
const string& Person::getAddress() const {
return address;
}
void Person::setAddress(const string& address) {
this->address = address;
}
const Date& Person::getBirthdate() const {
return birthdate;
}
void Person::setBirthdate(const Date& birthdate) {
this->birthdate = birthdate;
}
const string& Person::getName() const {
return name;
}
void Person::setName(const string& name) {
this->name = name;
}