Browse Source

Added the initial Student Management System Menu in Main class

remotes/origin/fdai7780
fdai7600 11 months ago
parent
commit
4e41d36c7a
  1. 59
      src/main/java/org/example/Main.java

59
src/main/java/org/example/Main.java

@ -1,7 +1,62 @@
package org.example; package org.example;
import java.util.Scanner;
public class Main { public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
public static void main(String[] args) {System.out.println("Hello world!");
Scanner scanner = new Scanner(System.in);
boolean exit = false;
while (!exit) {
System.out.println("\n--- Student Management System Menu ---");
System.out.println("1. Register Student");
System.out.println("2. Enroll Student in Course");
System.out.println("3. Add Course");
System.out.println("4. Delete Course");
System.out.println("5. Assign Grade");
System.out.println("6. View Grades");
System.out.println("7. Initialize with Dummy Data");
System.out.println("8. Exit");
System.out.print("Select an option: ");
int choice = scanner.nextInt();
switch (choice) {
case 1:
System.out.println("Register User selected");
break;
case 2:
System.out.println("Enter Student ID and Course Code to enroll:");
break;
case 3:
System.out.println("Add Course selected");
break;
case 4:
System.out.println("Delete Course selected");
break;
case 5:
System.out.println("Assign Grade selected");
break;
case 6:
System.out.println("View Grades selected");
break;
case 7:
System.out.println("Dummy data initialized.");
break;
case 8:
exit = true;
System.out.println("Exiting...");
break;
default:
System.out.println("Invalid option, please try again.");
}
}
scanner.close();
} }
} }
Loading…
Cancel
Save