C++
- voluntas
- @ignis_fatuus
- ブン
- @Linda_pp
- 清楚なC++メイドBOT
- @tzik_tack
- 長谷川一輝
- wraith13
- @jj1bdx
- @cpp_akira
- 安藤敏彦
- @srz_zumix
- Siv3D
- @okdshin
- @hnokx
- @ishidakei
- @take_cheeze
- TAKEI Yuya
- @mumumu
- I (@wx257osn2)
- Tommy6
- わたやん
- @KorekaraSEDB
- @kariya_mitsuru
- @ciniml
- @beam2d
- @grafi_tt
- @nekketsuuu
- LouiS0616
- @volanja
- 大鎌広
- むてら
- ガチKGB
- 三重野賢人
x
116
Teacher::Education_part e2("805034521", 5988, "Kherson, Boguna 6, 122", "goward@gmail.com");
1
2
3
using std::cout;
4
using std::endl;
5
using std::string;
6
7
struct Person {};
8
9
class Education_part : public Person
10
{
11
public:
12
Education_part();
13
14
Education_part(string phone,
15
int paymant,
16
string mAdress,
17
string m_email);
18
19
//getters/seters
20
public:
21
string get_Ph() const { return Phone; }
22
int get_Pay() const { return Payment; }
23
string get_Adress() const { return adress; }
24
string get_email() const { return email; }
25
26
27
void set_Ph(string phone) { Phone = phone; }
28
void set_Pay(int paymant) { Payment = paymant; }
29
void set_Adress(string mAdress) { adress = mAdress; }
30
void set_email(string m_email) { email = m_email; }
31
32
void print();
33
34
35
private:
36
37
string Phone;
38
int Payment;
39
string adress;
40
string email;
41
42
};
43
44
class Teacher : public Education_part
45
{
46
public:
47
48
Teacher();
49
50
Teacher(string Subject, string Position, string Degree);
51
52
public:
53
54
string get_Subject() const { return subject; }
55
string get_Position() const { return position; }
56
string get_Degree() const { return degree; }
57
58
59
60
void set_Subject(string Subject) { subject = Subject; }
61
void set_Position(string Position) { position = Position; }
62
void set_Degree(string Degree) { degree = Degree; }
63
64
void print();
65
66
67
private:
68
69
string subject;
70
string position;
71
string degree;
72
73
};
74
75
Education_part::Education_part(){}
76
77
Education_part::Education_part(string phone,
78
int paymant,
79
string mAdress,
80
string m_email)
$ g++ prog.cc -Wall -Wextra -std=gnu++2a
Start
Criminal Law teacher doctor of philosofy
0
Finish