Difference between revisions of "Set Intersector Assignment"
Jump to navigation
Jump to search
| Line 10: | Line 10: | ||
=Code To Implement= | =Code To Implement= | ||
| + | {{CodeToImplement|Intersections|intersectionOf|setintersector.group}} | ||
| + | {{Sequential|public static <E> Set<E> intersectionOf(Set<E> first, Set<E>... rest)}} | ||
=Testing= | =Testing= | ||
{{TestSuite|_IntersectionTestSuite|setintersector.group}} | {{TestSuite|_IntersectionTestSuite|setintersector.group}} | ||
Revision as of 18:33, 11 October 2022
Motivation
Performing the set intersection required by the Mutual Friends exercise can be a bit tricky. This group warmup will familiarize everyone with the provided [SetIntersector<E>] class.
Code To Investigate
SetIntersector<E>
class SetIntersector<E>
Code To Implement
| class: | Intersections.java | |
| methods: | intersectionOf | |
| package: | setintersector.group | |
| source folder: | student/src/main/java |
method: public static <E> Set<E> intersectionOf(Set<E> first, Set<E>... rest)
(sequential implementation only)
Testing
| class: | _IntersectionTestSuite.java | |
| package: | setintersector.group | |
| source folder: | testing/src/test/java |