-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBioData.cpp
125 lines (111 loc) · 2.73 KB
/
BioData.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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#include<iostream>
#include<ios>
#include<limits>
using namespace std;
class BioData {
private:
string name, address, gender;
long phone;
public:
BioData() {
name = "";
address = "";
gender = "";
phone = -1;
}
void getData() {
cout << "\nEnter your name: ";
cin >> name;
cout << "\nEnter gender: ";
cin >> gender;
cin.ignore(numeric_limits<streamsize>::max(), '\n');
cout << "\nEnter address: ";
getline(cin, address);
cout << "\nEnter phone number: ";
cin >> phone;
}
void putData() {
cout << "\nPERSONAL DETAILS:- \n";
cout << "\nNAME: " << name;
cout << "\nGENDER: " << gender;
cout << "\nADDRESS: " << address;
cout << "\nCONTACT: " << phone;
}
};
class ProfClass {
private:
string os, pl;
string classname;
public:
ProfClass() {
os = "";
pl = "";
classname = "";
}
void getData() {
cout << "\nEnter name of the course: ";
cin >> classname;
cin.ignore(numeric_limits<streamsize>::max(), '\n');
cout << "\nEnter which operating system do you know?: ";
getline(cin, os);
cout << "\nEnter which programming language do you know?: ";
getline(cin, pl);
}
void putData() {
cout << "\nPROFESSIONAL DETAILS:- \n ";
cout << "\nCOURSE: " << classname;
cout << "\nOS KNOWN: " << os;
cout << "\nPROGRAMMING LANGUAGES: " << pl;
}
};
class AcadClass {
private:
float ten, twe, fe;
public:
AcadClass() {
ten = -1;
twe = -1;
fe = -1;
}
void getData() {
cout << "\nEnter 10th class percentage: ";
cin >> ten;
cout << "\nEnter 12th class percentage: ";
cin >> twe;
cout << "\nEnter first year percentage: ";
cin >> fe;
}
void putData() {
cout << "\nACADEMIC DETAILS:- \n";
cout << "\n10th MARKS: " << ten;
cout << "\n12th MARKS: " << twe;
cout << "\nFE MARKS: " << fe;
}
};
class Resume : public BioData, public ProfClass, public AcadClass {
private:
string title;
public:
Resume() : BioData(), ProfClass(), AcadClass() {
title = "";
}
void getData() {
BioData::getData();
ProfClass::getData();
AcadClass::getData();
cout << "\nEnter the title for your Resume: ";
cin >> title;
}
void putData() {
cout << "\n=============================" << title << "=============================\n";
BioData::putData();
ProfClass::putData();
AcadClass::putData();
}
};
int main() {
Resume r1;
r1.getData();
r1.putData();
return 0;
}