CSC 217 Lab 11 - Recursive Linked Lists

CSC 217 Lab 11 - Update and Test Course and CourseRecordIO

CSC 217 Lab 11 Update and Test Course and CourseRecordIO

Now that you are adding a FacultySchedule to the system, you need to update Course and CourseRecordIO to connect to a Faculty teaching a Course. Right now, CourseRecordIO reads in an instructor id. You want to update CourseRecordIO to do the following:

  • Find if there’s a Faculty with the given id.
    • If so, the Course will be added to the FacultySchedule.
    • If not, the Course will have a null instructorId, which means a Registrar can assign a Faculty to the Course at a later time.

Update Course.setInstructorId()

Currently, Course does not allow for the instructorId to be null. However, since the Registrar should be able to assign Faculty to a Course, the instructorId should be null if no Faculty is assigned. Update Course.setInstructorId() to allow for a null instructorId.

Run your tests and update/remove tests that are no longer needed.

Update CourseRecordIO.readCourse()

Update CourseRecordIO.readCourse() to initially set the Course instructorId to null when a Course is first created.

Then the method should check if there is a Faculty with the given instructorId. If so, the Course should be added to the Faculty’s FacultySchedule. FacultySchedule.addCourseToSchedule() will update the Course object if the Faculty is added.

Run your tests and update/remove tests that are no longer needed.

Testing the New Functionality

Your FacutlyScheduleTest tests should pass when you have completed the updates to Course and CourseRecordIO.

Javadoc your Code

Javadoc the CourseRecordIO class and its methods.

Run CheckStyle to ensure that your Javadoc has all elements.

Push to GitHub

Push your PackScheduler project to GitHub

  • Add the unstaged changes to the index.
  • Commit and push changes. Remember to use a meaningful commit message describing how you have changed the code.

Reminder: Staging and Pushing to GitHub

GitHub Resources:

Check Jenkins

Check your project on Jenkins to ensure that you are making progress.

Reminder: Interpreting Jenkins

Check the following items on Jenkins for your last build and use the results to estimate your grade: