Question: import java.util.Scanner; public class SetDriver { public static void main ( String [ ] args ) { int [ ] A = new int [
import java.util.Scanner;
public class SetDriver
public static void mainString args
int Anew int;
int Bnew int;
int AUBnew int;
int AnBnew int;
int BCnew int;
int AMnew int;
int nm;
Scanner scnew ScannerSystemin;
AgetElementssc;
ngetLengthA;
System.out.print
Set A: ;
printElementsAn;
System.out.println
;
BgetElementssc;
mgetLengthB;
System.out.print
Set B: ;
printElementsBm;
System.out.println
;
System.out.printUnion of set A and B: ;
unionAnBm;
System.out.print
Intersection of set A and B: ;
intersetionAnBm;
System.out.print
Set Bs complement: ;
complementBm;
System.out.print
Production of intersection of set A and B and A: ;
productionAnBm;
public static int getElementsScanner sc
int n;
int Anew int;
System.out.printlnPlease enter unique element and enter to end the entering:";
whilen
AnscnextInt;
n;
ifAn
return A;
forint i;i
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
