Question: (JAVA) In Java, using arrays, implement from scratch (without using library classes) a set of instances of INTEGERS. Include operations of union, intersection, and relative
(JAVA) In Java, using arrays, implement from scratch (without using library classes) a set of instances of INTEGERS. Include operations of union, intersection, and relative complement. Document and test your set class.
(The union of two sets A and B, is the set of all items that are either in A or in B. The intersection is the set of items in both A and B. The complement of B with respect to A is the set of all items that are in A but not in B.) Your main method should declare and initialize a couple of set objects, and for each set operation should call a method that performs the operation, e.g., as in the following code: Set C = A.union(B); System.out.print(C.toString());
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
