Homework


Part A

Do problem 8.13 from the book (Set of Integers).  Watch for which methods they say should be static and which they don't.

Part B

Also create an enumeration BasicSet.  Each BasicSet contains a text description and an IntegerSet as follows

description set
empty contains no elements
universe contains every element
evens contains only evens
odds contains only odds

Use elements from the enum when testing IntegerSet's methods. (for instance, the union of the evens and the odds should be equal to?)

Part C

Back in IntegerSet, add a method complement which, given one IntegerSet, returns the complement IntegerSet (opposite values).

Also overload each of union, intersection, and complement so that it takes a variable length parameter list of IntegerSets, so it can do the union/intersection/complement of any number of sets.