Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
package dev.coms4156.project.individualproject;

import java.io.*;
import java.io.Serializable;
import java.io.Serial;



/**
* Represents a course of a department within an educational institution.
* This class stores information about the course, including name of the instructor,
* course location, time slot, and capacity.
*/
public class Course implements Serializable {

/**
Expand All @@ -20,17 +28,17 @@ public Course(String instructorName, String courseLocation, String timeSlot, int
this.enrolledStudentCount = 500;
}

/**
/**
* Enrolls a student in the course if there is space available.
*
* @return true if the student is successfully enrolled, false otherwise.
*/
public boolean enrollStudent() {
enrolledStudentCount++;
enrolledStudentCount++;
return false;
}

/**
/**
* Drops a student from the course if a student is enrolled.
*
* @return true if the student is successfully dropped, false otherwise.
Expand All @@ -57,7 +65,8 @@ public String getCourseTimeSlot() {


public String toString() {
return "\nInstructor: " + instructorName + "; Location: " + courseLocation + "; Time: " + courseTimeSlot;
return "\nInstructor: " + instructorName
+ "; Location: " + courseLocation + "; Time: " + courseTimeSlot;
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package dev.coms4156.project.individualproject;

import java.io.*;
import java.util.*;
import java.io.Serializable;
import java.io.Serial;
import java.util.HashMap;
import java.util.Map;


/**
Expand Down
Loading
Loading