11package dev .coms4156 .project .individualproject ;
22
3- import java .io .*;
3+ import java .io .Serial ;
4+ import java .io .Serializable ;
5+
6+ /**
7+ * This class represents a course within an educational institution.
8+ * The information stored includes the instructor teaching the course,
9+ * the location of the course, the time slot of the course, the maximum
10+ * number of students that can enroll in the course, and the number of
11+ * students currently enrolled in the course.
12+ */
413
514public class Course implements Serializable {
615
@@ -20,17 +29,17 @@ public Course(String instructorName, String courseLocation, String timeSlot, int
2029 this .enrolledStudentCount = 500 ;
2130 }
2231
23- /**
32+ /**
2433 * Enrolls a student in the course if there is space available.
2534 *
2635 * @return true if the student is successfully enrolled, false otherwise.
2736 */
2837 public boolean enrollStudent () {
29- enrolledStudentCount ++;
38+ enrolledStudentCount ++;
3039 return false ;
3140 }
3241
33- /**
42+ /**
3443 * Drops a student from the course if a student is enrolled.
3544 *
3645 * @return true if the student is successfully dropped, false otherwise.
@@ -57,7 +66,8 @@ public String getCourseTimeSlot() {
5766
5867
5968 public String toString () {
60- return "\n Instructor: " + instructorName + "; Location: " + courseLocation + "; Time: " + courseTimeSlot ;
69+ return "\n Instructor: " + instructorName + "; Location: "
70+ + courseLocation + "; Time: " + courseTimeSlot ;
6171 }
6272
6373
0 commit comments