import java.util.*; public class SetExample { public static void main (String[] argv) { // Create an instance of the data structure. LinkedList favoriteShows1 = new LinkedList(); // Put some elements in so that it becomes a set of strings. favoriteShows1.add ("Yes minister"); favoriteShows1.add ("Seinfeld"); favoriteShows1.add ("Cheers"); favoriteShows1.add ("Frasier"); favoriteShows1.add ("Simpsons"); // Create a second instance and add some elements. LinkedList favoriteShows2 = new LinkedList(); favoriteShows2.add ("Mad about you"); favoriteShows2.add ("Seinfeld"); favoriteShows2.add ("Frasier"); favoriteShows2.add ("Cosby show"); // Compute set intersection and the difference favoriteShows1-favoriteShows2 computeIntersection (favoriteShows1, favoriteShows2); computeDifference (favoriteShows1, favoriteShows2); } static void computeIntersection (LinkedList listA, LinkedList listB) { System.out.println ("Intersection:"); for (int i=0; i listA, LinkedList listB) { System.out.println ("Difference: "); for (int i=0; i