Browse Source

Adding addCourse method in Course class

remotes/origin/fdai7780
fdai7921 11 months ago
parent
commit
2542ae7b9d
  1. 6
      src/main/java/org/example/Course.java

6
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);
}
}
Loading…
Cancel
Save