Set Calculator

I wrote this little number in about a day and a half for my CS193 class (yes, it was due at day 1.5). Right now I'm only going to post the source code, but soon I hope to have a little java applet up and running so you can play with it in real-time, right off the website. Basically, the program is a command line utility, where you type in set operations, and it will calculate them for you and produce the output. Here are a few examples (lines beginning with > are what you(I) type, the rest is the result):

> a:{1,2,"hello"}
{1, 2, hello}

> b:{2,3,"hello"}
{2, 3, hello}

> a + b
{1, 2, hello, 3}

> a ^ b      (intersection)
{2, hello}

> a - {"hello"}
{1, 2}

If that doesn't whet your appetite... then you don't belong here. Go back to the main page. Otherwise, you can download the sourcecode here: setcalc.tar.gz. Installation instructions are here. You can browse the source here.