-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
64 lines (50 loc) · 1.47 KB
/
Copy pathmain.cpp
File metadata and controls
64 lines (50 loc) · 1.47 KB
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
#include <iostream>
#include "Student.h"
#include "FileManager.h"
using namespace std;
int main()
{
Student student;
FileManager fileManager;
int choice;
do
{
cout << "\n=====================================\n";
cout << " STUDENT MANAGEMENT SYSTEM\n";
cout << "=====================================\n";
cout << "1. Add Student\n";
cout << "2. Display All Students\n";
cout << "3. Search Student\n";
cout << "4. Update Student\n";
cout << "5. Delete Student\n";
cout << "6. Exit\n";
cout << "=====================================\n";
cout << "Enter your choice: ";
cin >> choice;
switch(choice)
{
case 1:
student.setStudentData();
fileManager.addStudent(student);
break;
case 2:
fileManager.displayStudents();
break;
case 3:
fileManager.searchStudent();
break;
case 4:
fileManager.updateStudent();
break;
case 5:
fileManager.deleteStudent();
break;
case 6:
cout << "Thank you for using the Student Management System!" << endl;
break;
default:
cout << "Invalid Choice! Please try again." << endl;
}
} while(choice != 6);
return 0;
}