-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInformation.cpp
More file actions
89 lines (70 loc) · 2.16 KB
/
Information.cpp
File metadata and controls
89 lines (70 loc) · 2.16 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#include <iostream>
#include <string>
#include <locale>
using namespace std;
class Information {
private:
string name;
string address;
int age;
string phone_number;
public:
void set_name(string n) {
name = n;
}
void set_address(string addr) {
address = addr;
}
void set_age(int a) {
age = a;
}
void set_phone_number(string phone) {
phone_number = phone;
}
string get_name() {
return name;
}
string get_address() {
return address;
}
int get_age() {
return age;
}
string get_phone_number() {
return phone_number;
}
};
int main() {
setlocale(LC_ALL, "RUS");
Information person1, person2, person3;
person1.set_name("Èâàíîâ Êèðèëë");
person1.set_address("óë. Ãåðìàíà Ëîïàòèíà 14");
person1.set_age(19);
person1.set_phone_number("+79306825283");
person2.set_name("Èâàíîâà Ëþäìèëà");
person2.set_address("óë. Ãåðìàíà Ëîïàòèíà 14");
person2.set_age(40);
person2.set_phone_number("+79306825281");
person3.set_name("Èâàíîâ Àëåêñåé");
person3.set_address("óë. Ãåðìàíà Ëîïàòèíà 14");
person3.set_age(43);
person3.set_phone_number("+79100572071");
cout << "Ïåðâûé ÷åëîâåê: " << endl;
cout << "Èìÿ: " << person1.get_name() << endl;
cout << "Àäðåñ: " << person1.get_address() << endl;
cout << "Âîçðàñò: " << person1.get_age() << endl;
cout << "Òåëåôîííûé íîìåð: " << person1.get_phone_number() << endl;
cout << endl;
cout << "Âòîðîé ÷åëîâåê: " << endl;
cout << "Èìÿ: " << person2.get_name() << endl;
cout << "Àäðåñ: " << person2.get_address() << endl;
cout << "Âîçðàñò: " << person2.get_age() << endl;
cout << "Òåëåôîííûé íîìåð: " << person2.get_phone_number() << endl;
cout << endl;
cout << "Òðåòèé ÷åëîâåê: " << endl;
cout << "Èìÿ: " << person3.get_name() << endl;
cout << "Àäðåñ: " << person3.get_address() << endl;
cout << "Âîçðàñò: " << person3.get_age() << endl;
cout << "Òåëåôîííûé íîìåð: " << person3.get_phone_number() << endl;
return 0;
}