
-----------------------------------
khanzaman
Sun Jan 18, 2009 2:02 am

help with quiz
-----------------------------------
I have a problem with my quiz its about adding the score i have radiobutton in each question but when i add an action where is their right they it adds one to their score and one to the answer so like this:

class .....

{
class quiz extends JFrame implements ActionListener
{
    //Score
   int score=0;
   int question=0;
    //question and answer
   String 


but when the score and answer are printed out in the a new frame it says 0/0.

only thing i could think of is that it is resetting the score and answer to 0 after every frame with a question.

does anyone noe how to fix that problem
ty

Use syntax or code tags! - wtd

-----------------------------------
wtd
Sun Jan 18, 2009 1:47 pm

RE:help with quiz
-----------------------------------
Hey look, I added syntax tags and now it looks all red.  Why is what?

-----------------------------------
khanzaman
Sun Jan 18, 2009 3:11 pm

Re: help with quiz
-----------------------------------
i didnt copy my whole program i was just giving you an example of how my program looks and why it wasnt adding the score

-----------------------------------
wtd
Sun Jan 18, 2009 8:02 pm

RE:help with quiz
-----------------------------------
And the part you did post is obviously broken, which is what I was pointing out.

-----------------------------------
deltatux
Sun Jan 18, 2009 8:35 pm

RE:help with quiz
-----------------------------------

String 

I think you forgot to close the curly brackets here.

deltatux

-----------------------------------
khanzaman
Sun Jan 18, 2009 9:20 pm

Re: help with quiz
-----------------------------------
i knowwwww but i  just want to know why the score doesnt add i just quickly copied that piece and deleted some stuff to shortin it down for you if u want to see my whole program its veryyy long
