Results 1 to 2 of 2
- 04-24-2011, 08:42 PM #1
Member
- Join Date
- Apr 2011
- Posts
- 1
- Rep Power
- 0
Compare true Answer /Player answer
Hello
It is a game with a part multiple-choice questionnaire and a part open.
For the part of open questions, we ask mathematical questions and the player has to answer by a number (in Jtextfield: rep = new JTextField ())
The questions / answers are in questions.java, I made like that:
And so on...Java Code:Tab_ques [0] = " how much make 3+4? "; Tab_rep [0] = "7"; Tab_ques [1] = " Complete the continuation : 0, 2,4,6, "; Tab_rep [1] = "8";
But for the part opened question, I don't know which codes to use and how to compare true answers with the player answers .Last edited by Eilime; 04-24-2011 at 09:19 PM.
-
Does your code even compile?
Java Code:Final JButton confirm=new JButton ("Confirm"); // variable declared as [color="red"][b]c[/b][/color]onfirm // THE ACTIONS(SHARES) TO CONFIRM Confirm.addActionListener (new ActionListener () { // variable used as [color="red"][b]C[/b][/color]onfirm
Also, when posting code here, please use code tags so that your code will retain its formatting and thus will be readable -- after all, your goal is to get as many people to read your post and understand your code as possible, right?
To do this, highlight your pasted code (please be sure that it is already formatted when you paste it into the forum; the code tags don't magically format unformatted code) and then press the code button, and your code will have tags.
Another way to do this is to manually place the tags into your code by placing the tag [code] above your pasted code and the tag [/code] below your pasted code like so:
Java Code:[code] // your code goes here // notice how the top and bottom tags are different [/code]
Similar Threads
-
How can I freeze this wave player when mute = true?
By Addez in forum New To JavaReplies: 2Last Post: 03-07-2011, 08:39 PM -
Should be simple answer...
By sleepingpeace in forum New To JavaReplies: 4Last Post: 02-17-2011, 01:01 PM -
Could anyway answer me this?
By Jojomofoman in forum New To JavaReplies: 14Last Post: 12-16-2010, 11:14 PM -
Why is the answer not coming out
By anonymous18 in forum New To JavaReplies: 4Last Post: 11-12-2008, 03:10 AM -
i want my answer to a whole number or i think an int, please help?
By soc86 in forum New To JavaReplies: 3Last Post: 11-02-2008, 01:29 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks