Suppose you are designing an IntSet class that represents an unordered collection of integers without duplication (that is, the same integer does not appear twice in the set). Some methods you might wish to include are the following:
• int[] toArray() //returns an array containing the integers in this set• boolean contains(int x) //returns true if x is in this set• boolean containsAll(IntSet otherSet) //returns true if this set contains all the integers in the other set• int size() //returns the number of integers in this set• boolean isEmpty() //returns true if this set has no integers in it• boolean equals(Object obj) //returns true if obj is a Set containing exactly the same integers as this Set
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.