/*////////////////////////////////////////////////////////// 15-111 Sections G and H Lab 3 Template Name: Section: Andrew Id: Last Updated: Comments to the grader: class Driver ///////////////////////////////////////////////////////////*/ import java.util.*; import javax.swing.JOptionPane; import Set; public class Lab03 { public static void main(String[] args) { String s; Set set1 = new Set(); Set set2 = new Set(); do { s = JOptionPane.showInputDialog("Enter an integer for set 1"); //if (s.equals("-999")) Integer n= new Integer(Integer.parseInt(s)); if (!s.equals("-999")) set1.add(n); } while (!s.equals("-999")); set1.print(); do { s = JOptionPane.showInputDialog("Enter an integer for set 2"); //if (s.equals("-999")) Integer n= new Integer(Integer.parseInt(s)); if (!s.equals("-999")) set2.add(n); } while (!s.equals("-999")); set2.print(); Set set3 = set1.intersection(set2); Set set4 = set1.union(set2); Set set5 = set1.complement(set2); set3.print(); set4.print(); set5.print(); System.out.println("That's all folks"); } }