Skip to content

Commit cac9d8b

Browse files
committed
Completed the style modification
1 parent 3ff1d58 commit cac9d8b

File tree

6 files changed

+377
-290
lines changed

6 files changed

+377
-290
lines changed

IndividualProject/src/main/java/dev/coms4156/project/individualproject/Course.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
package 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

514
public 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 "\nInstructor: " + instructorName + "; Location: " + courseLocation + "; Time: " + courseTimeSlot;
69+
return "\nInstructor: " + instructorName + "; Location: "
70+
+ courseLocation + "; Time: " + courseTimeSlot;
6171
}
6272

6373

IndividualProject/src/main/java/dev/coms4156/project/individualproject/Department.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package dev.coms4156.project.individualproject;
22

3-
import java.io.*;
4-
import java.util.*;
5-
3+
import java.io.Serial;
4+
import java.io.Serializable;
5+
import java.util.HashMap;
6+
import java.util.Map;
67

78
/**
89
* Represents a department within an educational institution.

0 commit comments

Comments
 (0)