I just recently ran into a problem I didn't think would occur. When I was debug printing my Battery implementation, by scanning the file and looking for the strings "BATTERY" and "high", I noticed that the next thing that the scanner scanned through in the file was "(a" with the parentheses attached to the letter a. Is it okay if I put a space in between these two characters so that I can get the wire name out of it or is there a way to ignore the parentheses sign and grab the wire name only?
You can use the String methods to strip off the "(". In particular look at startsWith() and substring(). You can also do it with Scanner if you know regular expressions.
Is the scanner function available in uhunix's java2? Or do I have to download the latest java to use the scanner function?
You will have to download the latest version. The most recent version on uhunix2 is 1.2 and only 1.5 has java.util.Scanner.