bugView credit limit shows the first student, not you
seen in the listing
The method loops over the whole student list and breaks after the first iteration, so it always prints the first student's limit and remaining hours.
FixUse this.getCreditLimit() and this.enrolledInHours() instead of looping.
bugDropping a course does not free the seat
seen in the listing
dropCourse removes the course from the student's list but never removes the student from the course's enrolledStudents. The roster, isFull() and the statistics still count the student.
FixAlso call course.getEnrolledStudents().remove(this).
bugSaved enrolments are lost when students load
seen in the listing
loadStudents runs before loadCourses, so getCourseByCode finds nothing and every student starts with no enrolled courses. Course rosters still list them, and enrolling again adds a duplicate roster entry.
FixLoad courses first, then resolve student course codes in a second pass.
designMost changes are only written on exit
seen in the listing
Enrolments, drops, grades, new or removed accounts, new or closed courses and instructor assignments stay in memory until someone types exit. Closing the window or an unexpected error loses them.
FixUse the dataManager methods that already save (enrollStudentInCourse, closeCourse…) or save after each change.
bugAn open course with space cannot be closed
seen in the listing
Administrator.closeCourse only closes full courses. For an open course that still has space, the “still has available capacity” branch can never be reached, so nothing is printed and the course stays open.
FixAdd an else branch that sets the status to Closed.
bugUnknown instructor ID aborts course creation
seen in the listing
If the ID does not match anyone, assignInstructor is called with null and calls getName() on it. The NullPointerException is caught, the message (null in Java 8) is printed, and the course is never added.
FixCheck selectedInstructor before calling assignInstructor.
quirkRemoving a student always ends with “Invalid option.”
seen in the listing
The println sits after the try/catch instead of inside the catch, so it runs every time.
FixMove it into the catch block.
quirkLogout messages are never shown
seen in the listing
Each logout() returns a string such as “Student Sara Khalid logged out.”, but main() ignores the return value.
FixPrint the returned message.
quirkAdmin login prints “No admin record” inside the loop
from the report
The failure message prints once for every administrator checked before the match, so a successful login can still show it.
FixPrint it once, after the loop.
designInstructor constructor ignores enrolledStudents
from the report
The constructor takes a List<Student> but never uses it. This may be intentional or an oversight.
FixRemove the parameter.
designUser setters do not validate
from the report
Input is checked by the Helpers validators before setters are called, which keeps User small but means code that calls a setter directly can store anything.
quirkHelpers.viewEnrollmentStatistics would throw
seen in the listing
Its printf has three placeholders but two arguments, which throws MissingFormatArgumentException. main() calls the dataManager version instead, so it never runs.
FixPass the course code, or delete the unused copy.
quirkInstructor profile update prints its message twice
seen in the listing
Both Instructor.updateInstructorPersonalInfo and the helper print “Instructor <name>'s information updated.”
designgradeStudent opens its own Scanner
seen in the listing
It creates new Scanner(System.in) for the score, while the rest of the program shares Helpers.input. Two Scanners on one stream can swallow buffered input.
FixUse Helpers.input or Helpers.getSafeIntInput.