|
|
@ -40,9 +40,14 @@ public class Main { |
|
|
|
switch (choice) { |
|
|
|
case 1: |
|
|
|
// Register User |
|
|
|
administration.registerUser(); |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
// Enroll Student in Course |
|
|
|
case 2: // Enroll Student in Course |
|
|
|
System.out.println("Enter Student ID:"); |
|
|
|
String studentId = scanner.next(); |
|
|
|
System.out.println("Enter Course ID:"); |
|
|
|
String courseId = scanner.next(); |
|
|
|
administration.enrollStudentInCourse(studentId, courseId); |
|
|
|
break; |
|
|
|
case 3: |
|
|
|
// Enroll Prof to Course |
|
|
@ -58,9 +63,24 @@ public class Main { |
|
|
|
break; |
|
|
|
case 6: |
|
|
|
// Create Course |
|
|
|
System.out.println("Enter Course Name:"); |
|
|
|
String courseName = scanner.next(); |
|
|
|
System.out.println("Enter Course ID:"); |
|
|
|
String courseID = scanner.next(); |
|
|
|
System.out.println("Enter Credits:"); |
|
|
|
int credits = scanner.nextInt(); |
|
|
|
administration.createCourse(courseName, courseID, credits); |
|
|
|
break; |
|
|
|
case 7: |
|
|
|
// Delete Course |
|
|
|
System.out.println("Enter the Course ID of the course you wish to delete:"); |
|
|
|
String courseIDToDelete = scanner.next(); |
|
|
|
boolean isDeleted = administration.deleteCourse(courseIDToDelete); |
|
|
|
if (isDeleted) { |
|
|
|
System.out.println("Course with ID " + courseIDToDelete + " has been successfully deleted."); |
|
|
|
} else { |
|
|
|
System.out.println("Course with ID " + courseIDToDelete + " not found."); |
|
|
|
} |
|
|
|
break; |
|
|
|
case 8: |
|
|
|
administration.viewCourses(); |
|
|
|