In Lab 4 you will implement a class Set . Objects of type Set will represent sets of integers. A set is a collection of values, called elements . The size of a set is the number of elements it contains. The empty set is a set that does not contain any elements, in other words, whose size is 0.
Sets have two important characteristics.
Sets do not contain duplicate elements. No, the insertion operation takes care of this. If a user attempts to insert a duplicate element into a set, the insertion operation notes that the element is already there and does nothing. Two important operations on sets are the union and intersection operations. The union of two sets A and B is the set containing all the elements of A and all the elements of B .