-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPerson.h
41 lines (25 loc) · 1001 Bytes
/
Person.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
#include <string>
#include "Date.h"
class Person {
private:
std::string name;
Date dateOfBirth;
std::string phoneNumber;
public:
Person();
Person(const std::string &name, const Date &date, const std::string& phoneNumber);
void read();
friend std::istream &operator>>(std::istream &stream, Person &person);
friend std::ostream &operator<<(std::ostream &stream, const Person &person);
void write() const;
unsigned int daysBeforeBirthday(Date now) const;
unsigned int daysBeforeBirthday() const;
int compare(const Person &other) const;
bool operator<=(const Person &other) const;
bool operator>=(const Person &other) const;
bool operator<(const Person &other) const;
bool operator>(const Person &other) const;
bool check(const std::string &nameStr,
const std::string &dayOfBirth, const std::string &monthOfBirth, const std::string &yearOfBirth,
const std::string &phoneNumberStr) const;
};