In the future, please use a more descriptive subject when posting a question. See posting guidelines.
This is an example of exactly what not to use for a title >.<
I have no idea what you're idea of QuestionAnswer object is. I also have no idea what you're looking to do with the JavaEvaluator.
What I can tell you is this is kinda just hanging out in the middle of you're class. Gotta put it somewhere:
// display question to the user:
// Read from the console:
BufferedReader userInput = new BufferedReader(new InputStreamReader(System.in));
// get value from console:
strAnswer = userInput.readLine();
catch (IOException ioe)
System.out.println("Error while trying to get input from user. Error=" + ioe.toString());
// throw new Exception("Error reading input. Error=" + ioe.toString());
I'm thinking in you're main method.
Anyways, sounds like this is a homework assignment. Please check out our rules (http://www.codingforums.com/rules.htm
) and refer to rule 1.5 regarding assignments. We can only direct specific problems, we cannot help you to program it.