diff --git a/src/main/java/org/example/Administration.java b/src/main/java/org/example/Administration.java index 4970258..d1baaa4 100644 --- a/src/main/java/org/example/Administration.java +++ b/src/main/java/org/example/Administration.java @@ -609,6 +609,14 @@ public class Administration { System.out.println("Course created successfully."); } + public void dropStudentFromCourseWithInput(Scanner scanner) { + System.out.println("Enter Student ID:"); + String studentID = scanner.next(); + System.out.println("Enter Course ID:"); + String courseID = scanner.next(); + dropStudentFromCourse(studentID, courseID); + } + } diff --git a/src/main/java/org/example/Main.java b/src/main/java/org/example/Main.java index 47a62e1..f8296ce 100644 --- a/src/main/java/org/example/Main.java +++ b/src/main/java/org/example/Main.java @@ -50,17 +50,10 @@ public class Main { case 4: // Drop Prof from Course administration.dropProfFromCourse(); - break; case 5: // Drop Student from Course - System.out.println("Enter Student ID"); - String studentID = scanner.next(); - System.out.println("Enter Course ID"); - String courseIdToDrop = scanner.next(); - - administration.dropStudentFromCourse(studentID, courseIdToDrop); - + administration.dropStudentFromCourseWithInput(scanner); break; case 6: // Create Course