There is nothing like a nice short question, but that one is maybe too short!
Do you mean, how do you do set operations like intersection difference and union? Go to the Java Tutorials, and you can read about the collections framework, which includes sets. There is an interface called Set, and it tells you which method represents union, intersection, etc. You can then call the same method on a class which implements the Set interface; HashSet is probably the most popular. For some versions of set difference you may have to do the procedure in several stages.
Aside: I've always thought professors would be better off giving early program assignments with code that performs the I/O already and input test files, so that new programmers can see some code and learn from it, and modify the code to do the crux of the work. Later in the term they can get the I/O part dumped on them.
Get some of it going, and if you have particular questions about your code as us.
Bill Shirley - bshirley - frazerbilt.com
if (Posts < 30) you.read( JavaRanchFAQ);
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop