-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
42 lines (37 loc) · 1.52 KB
/
Copy pathMain.java
File metadata and controls
42 lines (37 loc) · 1.52 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
package Student_Management_System;
import java.util.*;
public class Main {
public static void main(String[] args) {
while (true) {
System.out.println("\n===== MENU =====");
System.out.println("1. Add Student");
System.out.println("2. View All");
System.out.println("3. Search");
System.out.println("4. Update");
System.out.println("5. Delete");
System.out.println("6. Sort");
System.out.println("7. Topper");
System.out.println("8. Count");
System.out.println("9. Export");
System.out.println("10. Exit");
System.out.print("Enter choice: ");
int ch = StudentService.sc.nextInt();
switch (ch) {
case 1: StudentService.addStudent(); break;
case 2: StudentService.viewStudents(); break;
case 3: StudentService.searchStudent(); break;
case 4: StudentService.updateStudent(); break;
case 5: StudentService.deleteStudent(); break;
case 6: StudentService.sortStudents(); break;
case 7: StudentService.showTopper(); break;
case 8: StudentService.countStudents(); break;
case 9: StudentService.exportData(); break;
case 10:
System.out.println("Exiting...");
return;
default:
System.out.println("Invalid choice");
}
}
}
}