-
Notifications
You must be signed in to change notification settings - Fork 0
/
OBE Support System Implementation.cpp
1261 lines (1110 loc) · 36.2 KB
/
OBE Support System Implementation.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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include<cstring>
#include <vector>
#include <fstream>
using namespace std;
class Course;
class CLO;
class Question;
class OBE;
class Evaluation;
class Question
{
private:
int Eid;
int QId;
int CLO_Id;
char description[100];
public:
//default constructor
Question(int Eid = -1, int QId = -1, int CLO_Id = -1, string description = "")
{
this->Eid = Eid;
this->QId = QId;
this->CLO_Id = CLO_Id;
strcpy(this->description, description.c_str());
}
//getters
int getQId() {
return QId;
}
int getCLO_Id() {
return CLO_Id;
}
int getEid() {
return Eid;
}
//setters
void setQId(int id) {
QId = id;
}
void setCLO_Id(int id) {
CLO_Id = id;
}
void setEid(int id) {
Eid = id;
}
void setDes(string des) {
strcpy(this->description, des.c_str());
}
//print Question
void print() {
cout << "Question id: " << QId << "\n";
cout << "CLO id: " << CLO_Id << "\n";
cout << "Description: " << description << "\n";
}
};
class Evaluation
{
private:
int Cid;
int id;
vector<Question> questions;
public:
Evaluation(int Cid = 0, int id = 0) {
this->Cid = Cid;
this->id = id;
}
int getId() {
return id;
}
int getCid() {
return Cid;
}
void setId(int id) {
this->id = id;
}
void setCid(int Cid) {
this->Cid = Cid;
}
int addQuestion(int Eid, int Q_No, int CLO_Id, string des)
{
Question obj(Eid, Q_No, CLO_Id, des);
//adding question to the vector
questions.push_back(obj);
//adding question to the binary file
ofstream f("questions.bin", ios::binary | ios::app);
if (!f)
return 1;
else {
f.write((char*)&obj, sizeof(obj));
f.close();
return 0;
}
}
int RemoveQuestion(int Eid, int Q_No, int CLO_Id)
{
bool found = false;
int index = 0;
//finding the index of the question to be deleted
int size = questions.size();
while (index < size) {
if (questions[index].getEid() == Eid && questions[index].getQId() == Q_No && questions[index].getCLO_Id() == CLO_Id) {
found = true;
break;
}
else
index++;
}
//if question present
if (found) {
//deleting question from the vector
vector<Question>::iterator it;
it = index + questions.begin();
questions.erase(it);
//deleting the question from the binary file
ifstream fquestion("questions.bin", ios::binary);
ofstream dummy("dummy.bin", ios::binary);
Question obj;
while (fquestion.read((char*)&obj, sizeof(obj)))
{
if (obj.getCLO_Id() != CLO_Id || obj.getQId() == Q_No || obj.getEid() == Eid)
{
dummy.write((char*)&obj, sizeof(obj));
}
}
fquestion.close();
dummy.close();
remove("questions.bin");
if (rename("dummy.bin", "questions.bin"))
return 1;
else
return 0;
}
}
int UpdateQuestion(int Eid, int Q_No, int CLO_Id, int newQ_No, int newCLO_Id, string newdes)
{
int index = 0;
bool found = false;
//finding the index of the question to be updated
int size = questions.size();
while (index < size) {
if (questions[index].getEid() == Eid && questions[index].getQId() == Q_No && questions[index].getCLO_Id() == CLO_Id) {
found = true;
break;
}
else
index++;
}
//if question present
if (found)
{
//updating question in vector
questions[index].setQId(newQ_No);
questions[index].setCLO_Id(newCLO_Id);
questions[index].setDes(newdes);
//updating question in Binary file
fstream questionf2("questions.bin", ios::in | ios::out | ios::binary);
Question obj;
while (questionf2.read((char*)&obj, sizeof(obj)))
{
if (obj.getEid() == Eid && obj.getQId() == Q_No && obj.getCLO_Id() == CLO_Id)
{
obj.setQId(newQ_No);
obj.setCLO_Id(newCLO_Id);
obj.setDes(newdes);
std::streamoff fileptr = questionf2.tellg();
std::streamoff objsize = sizeof(obj);
questionf2.seekp(fileptr - objsize, ios::beg);
questionf2.write((char*)&obj, sizeof(obj));
questionf2.close();
return 1;
}
}
questionf2.close();
return 0;
}
}
void deleteAllQuestions() {
questions.clear();
}
int countQuestions(int CLO_Id) {
int count = 0;
int size = questions.size();
for (int i = 0; i < size; i++)
{
if (questions[i].getCLO_Id() == CLO_Id) {
count++;
}
}
return count;
}
bool checkCLOHasTested(int CLO_Id) {
if (countQuestions(CLO_Id) >= 2) {
return true;
}
else
return false;
}
void print() {
cout << "Evaluation id: " << id << "\n";
}
void printAllQuestions() {
for (int i = 0; i < questions.size(); i++) {
questions[i].print();
}
}
bool operator==(const Evaluation& c) {
if (Cid == c.Cid && id == c.id) {
return 1;
}
else
return 0;
}
};
class CLO
{
private:
int Cid;
int id;
char name[50];
public:
//default constructor
CLO(int Cid = -1, int id = -1, string name = "") {
this->Cid = Cid;
this->id = id;
strcpy(this->name, name.c_str());
}
//getters
int getCid() {
return Cid;
}
int getId() {
return id;
}
char* getName() {
return name;
}
//setters
void setCid(int Cid) {
this->Cid = Cid;
}
void setId(int id) {
this->id = id;
}
void setName(string name) {
strcpy(this->name, name.c_str());
}
//print CLO
void print() {
cout << "CLO id: " << id << "\n";
cout << "CLO name: " << name << "\n";
}
//operator == overloaded
bool operator==(const CLO& c) {
if (Cid == c.Cid && id == c.id && (strcmp(name, c.name) == 0)) {
return 1;
}
else
return 0;
}
};
class Course
{
private:
int id;
char name[50];
vector<CLO> CLOs;
vector<Evaluation> evals;
public:
Course(int id = -1, string name = "") {
this->id = id;
strcpy(this->name, name.c_str());
}
int addCLO(int Cid, int id, string name)
{
CLO obj(Cid, id, name);
//adding CLO to the vector
CLOs.push_back(obj);
//adding CLO to the binary file
ofstream f("CLOs.bin", ios::binary | ios::app);
if (!f)
return 1;
else {
f.write((char*)&obj, sizeof(obj));
f.close();
return 0;
}
}
int removeCLO(int Cid, int id) {
bool found = false;
int index = 0;
//finding the index of the CLO to be deleted
int size = CLOs.size();
while (index < size) {
if (CLOs[index].getId() == id && CLOs[index].getCid() == Cid) {
found = true;
break;
}
else
index++;
}
//if CLO present
if (found) {
//deleting CLO from the vector
vector<CLO>::iterator it;
it = index + CLOs.begin();
CLOs.erase(it);
//deleting the CLO from the binary file
ifstream f("CLOs.bin", ios::binary);
ofstream temp("temp.bin", ios::binary);
CLO obj;
while (f.read((char*)&obj, sizeof(obj)))
{
if (obj.getId() != id || obj.getCid() != Cid)
{
temp.write((char*)&obj, sizeof(obj));
}
}
f.close();
temp.close();
remove("CLOs.bin");
if (rename("temp.bin", "CLOs.bin"))
return 1;
else
return 0;
}
}
int updateCLO(int Cid, int id, string name, int newId, string newName)
{
int index = 0;
bool found = false;
//finding the index of the CLO to be updated
int size = CLOs.size();
while (index < size) {
if (CLOs[index].getId() == id && CLOs[index].getCid() == Cid) {
found = true;
break;
}
else
index++;
}
//if CLO present
if (found)
{
//updating CLO in vector
CLOs[index].setId(newId);
CLOs[index].setName(newName);
//updating CLO in Binary file
fstream f("CLOs.bin", ios::in | ios::out | ios::binary);
CLO obj;
while (f.read((char*)&obj, sizeof(obj)))
{
if (id == obj.getId() && Cid == obj.getCid())
{
obj.setId(newId);
obj.setName(newName);
std::streamoff fileptr = f.tellg();
std::streamoff objsize = sizeof(obj);
f.seekp(fileptr - objsize, ios::beg);
f.write((char*)&obj, sizeof(obj));
f.close();
return 1;
}
}
f.close();
return 0;
}
}
int addEval(int Cid, int id)
{
Evaluation obj(Cid, id);
//adding Evaluation to the vector
evals.push_back(obj);
//adding evaluation to the binary file
ofstream f("evaluations.bin", ios::binary | ios::app);
if (!f)
return 1;
else {
f.write((char*)&obj, sizeof(obj));
f.close();
return 0;
}
}
int removeEval(int Cid, int id) {
bool found = false;
int index = 0;
//finding the index of the evaluation to be deleted
int size = evals.size();
while (index < size) {
if (evals[index].getId() == id && evals[index].getCid() == Cid) {
found = true;
break;
}
else
index++;
}
//if evaluation present
if (found)
{
evals[index].deleteAllQuestions();
//deleting evaluation from the vector
vector<Evaluation>::iterator it;
it = index + evals.begin();
evals.erase(it);
//deleting the evalutaion from the binary file
ifstream f("evaluations.bin", ios::binary);
ofstream temp("temp2.bin", ios::binary);
Evaluation obj;
while (f.read((char*)&obj, sizeof(obj)))
{
if (obj.getId() != id || obj.getCid() != Cid)
{
temp.write((char*)&obj, sizeof(obj));
}
}
f.close();
temp.close();
remove("evaluations.bin");
if (rename("temp2.bin", "evaluations.bin"))
return 1;
else
return 0;
}
}
int updateEval(int Cid, int id, int newId)
{
int index = 0;
bool found = false;
//finding the index of the evaluation to be updated
int size = evals.size();
while (index < size) {
if (evals[index].getId() == id && evals[index].getCid() == Cid) {
found = true;
break;
}
else
index++;
}
//if evaluation present
if (found)
{
//updating evaluation in vector
evals[index].setId(newId);
//updating evaluation in Binary file
fstream f("evaluations.bin", ios::in | ios::out | ios::binary);
Evaluation obj;
while (f.read((char*)&obj, sizeof(obj)))
{
if (id == obj.getId() && Cid == obj.getCid())
{
obj.setId(newId);
std::streamoff fileptr = f.tellg();
std::streamoff objsize = sizeof(obj);
f.seekp(fileptr - objsize, ios::beg);
f.write((char*)&obj, sizeof(obj));
f.close();
return 1;
}
}
f.close();
return 0;
}
}
int getId() {
return id;
}
char* getName() {
return name;
}
void setId(int id) {
this->id = id;
}
void setName(string name) {
strcpy(this->name, name.c_str());
}
void print() {
cout << "Course id: " << id << "\n";
cout << "Course name: " << name << "\n";
}
void printallCLOs() {
int size = CLOs.size();
cout << "Course id: " << id << "\n";
for (int i = 0; i < size; i++) {
CLOs[i].print();
}
}
void printallEvals() {
int size = evals.size();
cout << "Course id: " << id << "\n";
for (int i = 0; i < size; i++)
{
evals[i].print();
}
}
int doesEvalExist(int Eid)
{
//finding the index of the evaluation to be searched
int size = evals.size();
int index = 0;
while (index < size) {
if (evals[index].getId() == Eid) {
return index;
}
index++;
}
return -1;
}
void addQuestionToEvaluation(int index, int Qid, int CLO_id, string des)
{
evals[index].addQuestion(evals[index].getId(), Qid, CLO_id, des);
}
void removeQuestionFromEvaluation(int index, int Qid, int CLO_id) {
evals[index].RemoveQuestion(evals[index].getId(), Qid, CLO_id);
}
void updateQuestionFromEvaluation(int index, int Qid, int CLO_id, int newQid, int newCLO_id, string newdes) {
evals[index].UpdateQuestion(evals[index].getId(), Qid, CLO_id, newQid, newCLO_id, newdes);
}
void printQuestionsInEval() {
for (int i = 0; i < evals.size(); i++)
{
cout << "Evaluation id: " << evals[i].getId();
cout << "\n";
evals[i].printAllQuestions();
}
}
void removeAllCLOs() {
CLOs.clear();
}
void removeAllEvals() {
for (int i = 0; i < evals.size(); i++) {
evals[i].deleteAllQuestions();
}
evals.clear();
}
int checkAllCLOsHasTested()
{
bool tested = false;
for (int i = 0; i < CLOs.size(); i++)
{
for (int j = 0; j < evals.size(); i++) {
if (evals[j].checkCLOHasTested(CLOs[i].getId()) == true) {
tested = true;
break;
}
}
if (!tested)
return 0;
}
return 1;
}
bool operator==(const Course& c) {
if (id == c.id && (strcmp(name, c.name) == 0)) {
return 1;
}
else
return 0;
}
};
class Interface {
public:
vector<Course> courses;
vector<Course>::iterator itr2;
void populateCourseVector() {
ifstream f("courses.bin", ios::in | ios::binary);
Course obj;
while (f.read((char*)&obj, sizeof(obj)))
{
courses.push_back(obj);
}
f.close();
}
int addCourse(int id, string name)
{
Course obj(id, name);
//adding course to the vector
courses.push_back(obj);
//adding course to the binary file
ofstream f("courses.bin", ios::binary | ios::app);
if (!f)
return 1;
else {
f.write((char*)&obj, sizeof(obj));
f.close();
return 0;
}
}
void updateCourse(int id, string name, int newId, string newName)
{
int index = 0;
bool found = false;
//finding the index of the course to be updated
int size = courses.size();
while (index < size) {
if (courses[index].getId() == id && courses[index].getName() == name) {
found = true;
break;
}
else
index++;
}
//if CLO present
if (found)
{
//updating course in vector
courses[index].setId(newId);
courses[index].setName(newName);
}
}
void removeCourse(int id, string name)
{
bool found = false;
int index = 0;
//finding the index of the course to be deleted
int size = courses.size();
while (index < size)
{
if (courses[index].getId() == id && courses[index].getName() == name) {
found = true;
break;
}
else
index++;
}
//go to CLOs remove all CLOs with this Cid
//go to evals remove all evals with this Cid
//go to questions remove all questions in the respective evals
courses[index].removeAllCLOs();
courses[index].removeAllEvals();
//if CLO present
if (found)
{
//deleting CLO from the vector
vector<Course>::iterator it;
it = index + courses.begin();
courses.erase(it);
}
}
};
int menu() {
int option = 0, optionToAdd = -1, optionToRemove = -1, optionToUpdate = -1, optionToPrint = -1;
Interface I;
//I.populateCourseVector();
cout << "Welcome to the OBE System\n";
cout << "-------------------------\n";
while (option != -1) {
cout << "\nDo you want to:\n";
cout << "Option -1: Exit\n";
cout << "Option 1: Add\n";
cout << "Option 2: Remove\n";
cout << "Option 3: Update\n";
cout << "Option 4: Print\n";
cout << "Option 5: Check\n";
cout << "Option: ";
cin >> option;
if (option == 1) {
cout << "\nDo you want to:\n";
cout << "Option 1: Add a Course\n";
cout << "Option 2: Add a CLO\n";
cout << "Option 3: Add an Evaluation\n";
cout << "Option 4: Add a Question\n";
cout << "Option: ";
cin >> optionToAdd;
if (optionToAdd == 1)
{
//add a course
int id;
string name;
cout << "Enter Course id: ";
cin >> id;
cout << "Enter Course name: ";
cin >> name;
I.addCourse(id, name);
cout << "Added successfully!\n";
}
else if (optionToAdd == 2)
{
//add a CLO respective to a course
int id, Cid;
string name;
int index = 0;
bool found = false;
cout << "\nEnter corresponding Course ID: ";
cin >> Cid;
//finding the index of the Course to be searched
int size = I.courses.size();
while (index < size) {
if (I.courses[index].getId() == Cid) {
found = true;
break;
}
else
index++;
}
if (found) {
cout << "Enter CLO id: ";
cin >> id;
cout << "Enter CLO name: ";
cin >> name;
I.courses[index].addCLO(Cid, id, name);
cout << "Added successfully!\n";
}
else
cout << "Incorrect Course id!\n";
}
else if (optionToAdd == 3) {
//add an evaluation respective to a course
int id, Cid;
int index = 0;
bool found = false;
cout << "\nEnter corresponding Course ID: ";
cin >> Cid;
//finding the index of the Course to be searched
int size = I.courses.size();
while (index < size) {
if (I.courses[index].getId() == Cid) {
found = true;
break;
}
else
index++;
}
if (found) {
cout << "Enter Evaluation id: ";
cin >> id;
I.courses[index].addEval(Cid, id);
cout << "Added successfully!\n";
}
else
cout << "Incorrect Course Id.\n";
}
else if (optionToAdd == 4)
{
//add a question respective to a course
int Qid, CLO_id, Eid, Cid;
string des;
int i = 0;
bool found = false;
cout << "\nEnter corresponding Course ID: ";
cin >> Cid;
//finding the index of the Course to be searched
int size = I.courses.size();
while (i < size) {
if (I.courses[i].getId() == Cid) {
found = true;
break;
}
else
i++;
}
if (found)
{
cout << "Enter corresponding Evaluation ID: ";
cin >> Eid;
//finding the index of the Evaluation to be searched
int index = I.courses[i].doesEvalExist(Eid);
if (index != -1)
{
cout << "Enter Question id: ";
cin >> Qid;
cout << "Enter CLO id: ";
cin >> CLO_id;
cout << "Enter Question description: ";
cin >> des;
I.courses[i].addQuestionToEvaluation(index, Qid, CLO_id, des);
cout << "Added successfully!\n";
}
else
cout << "Incorrect Evaluation id!\n";
}
else
cout << "Incorrect Course id!\n";
}
else {
return -1;
}
}
else if (option == 2) {
cout << "\nDo you want to:\n";
cout << "Option 1: Remove a Course\n";
cout << "Option 2: Remove a CLO\n";
cout << "Option 3: Remove an Evaluation\n";
cout << "Option 4: Remove a Question\n";
cout << "Option: ";
cin >> optionToRemove;
if (optionToRemove == 1) {
//remove a course
int id;
string name;
cout << "Enter Course id: ";
cin >> id;
cout << "Enter Course name: ";
cin >> name;
I.removeCourse(id, name);
cout << "Removed successfully\n";
}
else if (optionToRemove == 2) {
//remove a CLO respective to a course
int id, Cid;
int index = 0;
bool found = false;
cout << "\nEnter corresponding Course ID: ";
cin >> Cid;
//finding the index of the Course to be searched
int size = I.courses.size();
while (index < size) {
if (I.courses[index].getId() == Cid) {
found = true;
break;
}
else
index++;
}
if (found) {
cout << "Enter CLO id: ";
cin >> id;
I.courses[index].removeCLO(Cid, id);
cout << "Removed successfully!\n";
}
else
cout << "Incorrect Course Id.\n";
}
else if (optionToRemove == 3) {
//remove a evaluation respective to a course
int id, Cid;
int index = 0;
bool found = false;
cout << "\nEnter corresponding Course ID: ";
cin >> Cid;
//finding the index of the Course to be searched
int size = I.courses.size();
while (index < size) {
if (I.courses[index].getId() == Cid) {
found = true;
break;
}
else
index++;
}
if (found) {
cout << "Enter Evaluation id: ";
cin >> id;
I.courses[index].removeEval(Cid, id);
cout << "Removed successfully!\n";
}
else
cout << "Incorrect Course Id.\n";
}
else if (optionToRemove == 4)
{
//remove a question respective to a course
int Qid, CLO_id, Eid, Cid;
string des;
int i = 0;
bool found = false;
cout << "\nEnter corresponding Course ID: ";
cin >> Cid;
//finding the index of the Course to be searched
int size = I.courses.size();
while (i < size) {
if (I.courses[i].getId() == Cid) {
found = true;
break;
}
else
i++;
}
if (found)
{
cout << "Enter corresponding Evaluation ID: ";
cin >> Eid;