Now that the CourseNameValidator is complete, the Course class should use it to validate course names at construction.
Integrate CourseNameValidator into Course
Follow the provided design to integrate CourseNameValidator into the Course class.
Update Tests!
With the new CourseNameValidator functionality, and no longer allowing any spaces in course names, you’ll need to update the tests for Course and other classes in your PackScheduler system.
You can use the updated course_records.txt file to test your code. The changes should only require removing the space from between the leading prefix and the ending number.
Course names no longer contain a space between the letter prefix and the digit number (e.g., CSC216 instead of CSC 216). You must update all references to course names across your project, including:
- Test input files (e.g.,
course_records.txt, expected output files) - Hardcoded course name strings in your unit tests (e.g.,
CourseTest,CourseCatalogTest,RegistrationManagerTest) - Any
Courseconstructor calls in test classes that use the old format with a space
If teaching staff tests fail after integrating CourseNameValidator, check for leftover course name strings that still contain a space.
GitHub Resources:
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.
