@@ -368,7 +368,19 @@ public ResponseEntity<?> dropStudent(@RequestParam(value = "deptCode") String de
368368 }
369369 }
370370
371-
371+ /**
372+ * Endpoint for setting the enrollment count for a specified course.
373+ * This method handles PATCH requests to change the enrollment count of a course identified by
374+ * department code and course code. If the course exists, its enrollment count is updated to the
375+ * provided enrollment count (if valid).
376+ *
377+ * @param deptCode A {@code String} representing the department.
378+ * @param courseCode A {@code int} representing the course within the department.
379+ * @param count A {@code int} representing the enrollment count to be set for this course.
380+ * @return A {@code ResponseEntity} object containing an HTTP 200
381+ * response with an appropriate message or the proper status
382+ * code in tune with what has happened.
383+ */
372384 @ PatchMapping (value = "/setEnrollmentCount" , produces = MediaType .APPLICATION_JSON_VALUE )
373385 public ResponseEntity <?> setEnrollmentCount (@ RequestParam (value = "deptCode" ) String deptCode ,
374386 @ RequestParam (value = "courseCode" ) int courseCode ,
@@ -467,7 +479,18 @@ public ResponseEntity<?> changeCourseTeacher(@RequestParam(value = "deptCode") S
467479 }
468480 }
469481
470-
482+ /**
483+ * Endpoint for changing the location of a course.
484+ * This method handles PATCH requests to change the location of a course identified by
485+ * department code and course code. If the course exists, its location is updated to the
486+ * provided location.
487+ *
488+ * @param deptCode the code of the department containing the course
489+ * @param courseCode the code of the course to change the instructor for
490+ * @param location the new location for the course
491+ * @return a ResponseEntity with a success message if the operation is
492+ * successful, or an error message if the course is not found
493+ */
471494 @ PatchMapping (value = "/changeCourseLocation" , produces = MediaType .APPLICATION_JSON_VALUE )
472495 public ResponseEntity <?> changeCourseLocation (@ RequestParam (value = "deptCode" ) String deptCode ,
473496 @ RequestParam (value = "courseCode" ) int courseCode ,
0 commit comments