diff --git a/src/main/java/org/example/Course.java b/src/main/java/org/example/Course.java index ff8a721..9092951 100644 --- a/src/main/java/org/example/Course.java +++ b/src/main/java/org/example/Course.java @@ -146,5 +146,9 @@ public class Course { return courses; } - + public static void addCourse(String courseName, String courseCode, int courseCredit, String filename) { + // Write course data to the file + Course course = new Course(); + course.writeToFile(courseName, courseCode, courseCredit, filename); + } }