-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTask1_main.cpp
46 lines (38 loc) · 1.01 KB
/
Task1_main.cpp
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
/**
* @file Task1_main.cpp
*
* @brief This code implements inheritance (Task/Example2).
*
* @author Saif Ullah Ijaz
*
*/
// SYSTEM INCLUDES
#include <iostream>
using namespace std;
// LOCAL INCLUDES
#include "Teacher_Task1.h"
#include "Student_Task1.h"
#include "Doctor_Task1.h"
// function main begins program execution
void main() {
Student s1; {
Student s2("Muhammad Rafael", 17, 'M',"studen", "Computer Science", 2014);
s1 = s2;
cout << "Student 2: " << endl << "Name: " << s2.GetName() << endl;
s2.Eat();
s2.Walk();
s2.Study();
s2.HeldExam();
}
cout << "Student 1: " << endl << "Name: " << s1.GetPerson().GetName() << endl;
cout << "Age: " << s1.GetPerson().GetAge() << endl;
cout << "Gender: " << s1.GetPerson().GetGender() << endl;
cout << "Program: " << s1.GetStudent().GetProgram() << endl;
cout << "Studey Year: " << s1.GetStudent().GetStudyYear() << endl;
s1.Eat();
s1.Walk();
s1.Study();
s1.HeldExam();
system("pause");
}
// end main