diff --git a/src/main/java/org/example/Course.java b/src/main/java/org/example/Course.java index 10cb36b..1714e77 100644 --- a/src/main/java/org/example/Course.java +++ b/src/main/java/org/example/Course.java @@ -203,7 +203,7 @@ public class Course { // Add the course using the provided data addCourse(courseName, courseCode, courseCredit, filename); - System.out.println("Added Course successfully!"); + System.out.println(courseName + " added successfully!"); } /** @@ -231,6 +231,8 @@ public class Course { int selection = scanner.nextInt(); + String toDeleteCourse = courses.get(selection-1).getCourseName(); + if (selection == 0) { return; // Return to the menu } else if (selection < 1 || selection > courses.size()) { @@ -251,7 +253,7 @@ public class Course { e.printStackTrace(); } - System.out.println("Course deleted successfully."); + System.out.println(toDeleteCourse + " deleted successfully."); return; } }