put the code in code tags and describe what the error is -- that will help ppl know what they are looking for.
BestJewSinceJC commented: legitimate post, down voted for no reason. +4
put the code in code tags and describe what the error is -- that will help ppl know what they are looking for.
I agree with BJSJC, but I also realize that by posting here the thread will remain unclosed. So now that I have interjected my opinion, you may kill the thread :)
Also, please use code tags to make your code more readable.
This program creates 2 methods for convenience: menu() and binaryQ(). The menu method accepts several strings as its parameters. The first of the strings is the question to be displayed at the top of the menu. The following strings are the menu choices. For instance, if you call Confirmer.menu("What is your favorite fruit?","Apple","Orange","Banana");
the program will print the following:
What is your favorite fruit?
1) Apple
2) Orange
3) Banana
Enter selection number:
The binaryQ method accepts a single string as a parameter, representing the question. Then it asks the user to answer yes or no. Capitalization of the answer will not affect the code. If the user answers with a word that begins with y or n, the computer will read it as yes or no -- this way, "yea", "yup" and "yes" are all evaluated the same way. Of course, if you answer "Yetti," the computer will still evaluate that as an affirmative answer. If the answer is yes, the method returns true; if the answer is no the method returns false.
Neither method will crash from invalid input -- instead they will simply request valid input, and will loop until valid input is provided.
Um... I have no idea how you intend to hook up the webcam with java... that sounds really advanced. However, I would recommend serializing your database each time the program closes and deserializing it each time it opens. Check out the serializable interface on the Java API.