|
|
@ -509,6 +509,17 @@ public class Administration { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public void enrollStudentInCourseInteractive() { |
|
|
|
System.out.println("Enter Student ID:"); |
|
|
|
String studentId = scanner.nextLine(); // Use nextLine for consistent input handling |
|
|
|
System.out.println("Enter Course ID:"); |
|
|
|
String courseId = scanner.nextLine(); |
|
|
|
|
|
|
|
boolean enrolled = enrollStudentInCourse(studentId, courseId); |
|
|
|
// Feedback for failure is handled within the enrollStudentInCourse method |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public void viewCourses() { |
|
|
|
if (courses.isEmpty()) { |
|
|
|
System.out.println("No courses available."); |
|
|
|