1
+ //#pragma once
2
+ //
3
+ //class Doctor {
4
+ //public:
5
+ // string _name, _position;
6
+ // int _salary;
7
+ // Doctor() = default;
8
+ // Doctor(string name, string position, int salary)
9
+ // {
10
+ // _name = name;
11
+ // _position = position;
12
+ // _salary = salary;
13
+ // }
14
+ // void print() {
15
+ // cout << "Name: " << _name << endl;
16
+ // cout << "Position: " << _position << endl;
17
+ // cout << "Salary: " << _salary << endl;
18
+ // }
19
+ //
20
+ //
21
+ //};
22
+ //
23
+ //class HeartDoc : public Doctor {
24
+ //public:
25
+ // size_t _height;
26
+ // HeartDoc() = default;
27
+ // HeartDoc(string name, string position, int salary, size_t height) :Doctor(name, position, salary)
28
+ // {
29
+ // _height = height;
30
+ // }
31
+ // void print() {
32
+ // Doctor::print();
33
+ // cout << "Height: " << _height << endl;
34
+ // };
35
+ //
36
+ //};
37
+ //class BrainDoc : public Doctor {
38
+ //public:
39
+ // size_t _weight;
40
+ // BrainDoc() = default;
41
+ // BrainDoc(string name, string position, int salary, size_t weight) :Doctor(name, position, salary)
42
+ // {
43
+ // _weight = weight;
44
+ // }
45
+ // void print() {
46
+ // Doctor::print();
47
+ // cout << "Weight: " << _weight << endl;
48
+ // };
49
+ //
50
+ //};
51
+ //class EyeDoctor : public Doctor {
52
+ //public:
53
+ // size_t _expYear;
54
+ // EyeDoctor() = default;
55
+ // EyeDoctor(string name, string position, int salary, size_t expYear) :Doctor(name, position, salary)
56
+ // {
57
+ // _expYear = expYear;
58
+ // }
59
+ // void print() {
60
+ // Doctor::print();
61
+ // cout << "exp Year: " << _expYear << endl;
62
+ // };
63
+ //
64
+ //};
65
+ //
66
+ //void main() {
67
+ // BrainDoc bd{ "Huseyn","Brain",2200,70 };
68
+ // bd.print();
69
+ // cout << "---------Next Doctor---------" << endl;
70
+ // EyeDoctor ed{ "Huseyn","Eye",2200,5 };
71
+ // bd.print();
72
+ // cout << "---------Next Doctor---------" << endl;
73
+ // HeartDoc hd{ "Huseyn","Heart",2200,176 };
74
+ // bd.print();
75
+ // cout << "---------Next Doctor---------" << endl;
76
+ //
77
+ //}
0 commit comments