-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
82 lines (72 loc) · 1.34 KB
/
Copy pathmain.cpp
File metadata and controls
82 lines (72 loc) · 1.34 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#include "LinkedList.h"
int main()
{
LinkedList list;
list.loadFromFile("students.txt");
int choice;
do
{
cout << "\n=====================================\n";
cout << " Student Record Management System\n";
cout << "=====================================\n";
cout << "1. Add Student\n";
cout << "2. Display Students\n";
cout << "3. Search Student\n";
cout << "4. Update Student\n";
cout << "5. Delete Student\n";
cout << "6. Dashboard\n";
cout << "7. Exit\n";
cout << "\nEnter your choice: ";
cin >> choice;
switch(choice)
{
case 1:
{
list.addStudent();
list.saveToFile("students.txt");
break;
}
case 2:
list.displayStudents();
break;
case 3:
{
int rollNo;
cout << "Enter Roll Number: ";
cin >> rollNo;
list.searchStudent(rollNo);
break;
}
case 4:
{
int rollNo;
cout << "Enter Roll Number: ";
cin >> rollNo;
list.updateStudent(rollNo);
list.saveToFile("students.txt");
break;
}
case 5:
{
int rollNo;
cout << "Enter Roll Number: ";
cin >> rollNo;
list.deleteStudent(rollNo);
list.saveToFile("students.txt");
break;
}
case 6:
{
list.displayDashboard();
break;
}
case 7:
cout << "Thank you for using the system.\n";
break;
default:
cout << "Invalid Choice.\n";
}
}
while(choice != 7);
return 0;
}