Encapsulate Collection

A method returns a collection.

Make it return a read-only view and provide add/remove methods.

image/svg+xml Person getCourses(): SetsetCourses(:Set) Person getCourses(): UnmodifiableSetaddCourse(:Course)removeCourse(:Course)