-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPerson.h
More file actions
40 lines (35 loc) · 670 Bytes
/
Copy pathPerson.h
File metadata and controls
40 lines (35 loc) · 670 Bytes
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
#ifndef PERSON_H
#define PERSON_H
#include <iostream>
#include <string>
using namespace std;
using std::string;
class Person {
private:
int id;
string name;
public:
Person(int id, string name) {
this->id = id;
this->name = name;
}
// destructor
~Person(){
}
void setName(string name) {
this->name = name;
}
void setID(int id) {
this->id = id;
}
string getName() {
return this->name;
}
int getID() {
return this->id;
}
// prototypes
bool operator<(Person&);
friend std::ostream& operator<<(std::ostream&, Person&);
};
#endif // !PERSON_H