-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathSource.cpp
323 lines (255 loc) · 7.16 KB
/
Source.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
#pragma once
#include<iostream>
#include"Display.h"
#include"Department.h"
#include"Student.h"
#include"Courses.h"
#include"SubCampuses.h"
#include"Faculties.h"
#include"Employee.h"
#include<vector>
#include<string>
using namespace std;
using namespace std;
int main()
{
Display display;
Student student;
SubCampuses sub_campuses;
AcademicRecord academicRecord;
//For Polymorphism and using virtual functions pointers or refrences one is necessary to use otherwise
//we cannot use virtual functions and polymorphism
//I am declaring current account pointer
//Declaring Saving Account
//Declaring Saving Account
bool check = true;
while (check == true)
{
/// <summary>
///
char options;
cout << "\n\nEnter what you want to do \n\n1) For entering the Faculties data,\n2) For Showing the Faculties data"
<< "\n3) For Entering the Employees data\n4) For Showing the Employees data \n5) For Entering the students data\n"
<< "\n6) For Showing the students data\n7) For Entering the Information of University Sub Campuses \n8) For showing the information about university Sub Campuses "
<< " \n\nAND9) e for exiting the program";
cin >> options;
switch (options)
{
case '1':
{
string name;
string email;
string address;
float decidedSalary;
string paymentMethod;
int totalWorkingHours;
int id;
//The manager class data
cout << "\nEnter the Data of Faculties Class: \n";
cout << "\nEnter the name of Faculty: \t";
cin >> name;
cout << "\nEnter the Email of Faculty: \t";
cin >> email;
cout << "\nEnter the Id of Faculty: \t";
cin >> id;
cout << "\nEnter the Address of Faculty: \t";
cin >> address;
cout << "\nEnter the decided Salary of Faculty: \t";
cin >> decidedSalary;
cout << "\nEnter the paymemt Method of Faculty: \t";
cin >> paymentMethod;
cout << "\nEnter the Id of Faculty: \t";
cin >> id;
cout << "\nEnter the Address of Faculty: \t";
cin >> address;
cout << "\nEnter the total working hours of Faculty: \t";
cin >> totalWorkingHours;
display.setFacultiesInfo(name, id, address, email, decidedSalary, paymentMethod, totalWorkingHours);
break;
}
case '2':
{
int index;
cout << "\nEnter the index at which you want to see faculties info";
cin >> index;
cout << "\nThe data of Faculty is : ";
display.ShowFacultiesDetails(index);
break;
}
case '3':
{
string name;
string email;
string address;
float decidedSalary;
string paymentMethod;
int totalWorkingHours;
int id;
//The manager class data
cout << "\nEnter the Data of Employees Class: \n";
cout << "\nEnter the name of Employees: \t";
cin >> name;
cout << "\nEnter the Email of Employees: \t";
cin >> email;
cout << "\nEnter the Id of Employees: \t";
cin >> id;
cout << "\nEnter the Address of Employees: \t";
cin >> address;
cout << "\nEnter the decided Salary of Employees: \t";
cin >> decidedSalary;
cout << "\nEnter the paymemt Method of Employees: \t";
cin >> paymentMethod;
cout << "\nEnter the total working hours of Employees: \t";
cin >> totalWorkingHours;
display.setEmployeesInfo(name, id, address, email, decidedSalary, paymentMethod, totalWorkingHours);
break;
}
case '4':
{
int index;
cout << "\nEnter the index at which you want to see Emloyees info";
cin >> index;
cout << "\nThe data of Employee is : ";
display.ShowEmployeesDetails(index);
break;
}
case '5':
{
float attandancePercentage;
float CGPA;
char grades;
float marksPercentage;
string name;
string address;
string email;
int id;
cout << "\nEnter the Sudents Info\n";
cout << "\nEnter the students name";
cin >> name;
cout << "\nEnter the students ID";
cin >> id;
cout << "\nEnter the students address";
cin >> address;
cout << "\nEnter the students Email";
cin >> email;
cout << "\nEnter the students attandance Percentage";
cin >> attandancePercentage;
cout << "\nEnter the students CGPA";
cin >> CGPA;
cout << "\nEnter the students grades";
cin >> grades;
cout << "\nEnter the students marks percentage";
cin >> marksPercentage;
student.setName(name);
student.setEmail(email);
student.set_address(address);
student.set_id(id);
student.set_Attandance_percentage(attandancePercentage);
student.set_GCPA(CGPA);
student.set_student_grades(grades);
student.set_student_marks(marksPercentage);
break;
}
case '6':
{
int index;
cout << "\n\nEnter the index at which you want students Info";
cin >> index;
student.ShowStudentAcademicRecord(index);
break;
}
case '7':
{
cout << "\nEnter the info about Sub Campuses of University\n";
string name;
string address;
string email;
string description;
float area;
int id;
string ccname;
string ccaddress;
string ccemail;
int ccid;
float ccsalary;
float ccmonthlyBudget;
cout << "\nEnter the campus id";
cin >> id;
cout << "\nEnter the campus name";
cin >> name;
cout << "\nEnter the campus description";
cin >> description;
cout << "\nEnter the campus Adress";
cin >> address;
cout << "\nEnter the campus Area";
cin >> area;
cout << "\nEnter the campus coordinator id";
cin >> ccid;
cout << "\nEnter the campus coordinator name";
cin >> ccname;
cout << "\nEnter the campus coordinator salary";
cin >> ccsalary;
cout << "\nEnter the campus coordinator email";
cin >> ccemail;
cout << "\nEnter the campus coordinator address";
cin >> ccaddress;
cout << "\nEnter the campus coordinator Monthly Budget";
cin >> ccmonthlyBudget;
sub_campuses.set_campus_id(id);
sub_campuses.set_campus_name(name);
sub_campuses.set_campus_decription(description);
sub_campuses.setCampusAddress(address);
sub_campuses.setCampusCoordinator(ccname, ccsalary, ccid, ccaddress, ccemail, ccmonthlyBudget);
sub_campuses.setCampusArea(area);
break;
}
case '8':
{
int index;
cout << "\nEnter the address at which you want Sub Campuses Details\n";
cin >> index;
cout << "\nThe Sub Campuses id is" << sub_campuses.get_campus_id(index);
cout << "\nThe Sub Campuses name is" << sub_campuses.get_campus_name(index);
cout << "\nThe Sub Campuses description is" << sub_campuses.get_campus_decription(index);
cout << "\nThe Sub Campuses address is" << sub_campuses.getCampusAddress(index);
cout << "\nThe Sub Campuses area is" << sub_campuses.getCampusArea(index);
//Show campus details
sub_campuses.ShowCampusCoordinatorDetails(index);
break;
}
case 'e':
{
cout << "The program is ending now: ";
break;
}
default:
{
cout << "\n\nEnter right value please: \n";
}
}
/// </summary>
/// <returns></returns>
char option;
cout << "Enter y for opening menu again and n for exiting\t";
cin >> option;
while (option != 'y' && option != 'n')
{
cout << "Enter right value Please! only y or n: ";
char option1;
cin >> option1;
if (option1 == 'y' || option1 == 'n')
{
break;
}
}
if (option == 'y')
{
check = true;
}
else if (option == 'n')
{
check = false;
cout << "The program is ending now! ";
}
}
}