herIntSet is returned. // Note: Equivalently (see postcondition of add), the IntSet // returned is one that initially is an exact copy of the // invoking IntSet but subsequently has all elements of // otherIntSet added. // IntSet intersect(const IntSet& otherIntSet) const // Pre: (none) // Post: An IntSet representing the intersection of the invoking // IntSet and otherIntSet is returned. // Note: Equivalently (see postcondition of remove), the IntSet // returned is one that initially is an exact
IntSet unionWith(const IntSet& otherIntSet) const
// Pre: (none)
// Post: An IntSet representing the union of the invoking IntSet
// and otherIntSet is returned.
// Note: Equivalently (see postcondition of add), the IntSet
// returned is one that initially is an exact copy of the
// invoking IntSet but subsequently has all elements of
// otherIntSet added.
// IntSet intersect(const IntSet& otherIntSet) const
// Pre: (none)
// Post: An IntSet representing the intersection of the invoking
// IntSet and otherIntSet is returned.
// Note: Equivalently (see postcondition of remove), the IntSet
// returned is one that initially is an exact copy of the
// invoking IntSet but subsequently has all of its elements
// that are not also elements of otherIntSet removed.
Step by step
Solved in 3 steps