Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Won't Calculate Score Correctly
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
AzWildcats81




PostPosted: Sun Jan 16, 2005 3:38 pm   Post subject: Won't Calculate Score Correctly

When i i want it to add a certain amount to the intCashEarned varable and then display it, it will just subtract tha amount instead. Im using Ready to Program. Here is some example code of what im talking about.

code:
Object objSource = evt.getSource ();
        //Catagory #1 -- $100
        if (objSource == btn100Cat1)
        {
            sndTheme.play ();
            lblQLine1.setText ("What is the capitol of Canada?");
            lblAnsA.setText ("A: Ottawa");
            lblAnsB.setText ("B: Toronto");
            lblAnsC.setText ("C: Vancouver");
            btn100Cat1.setEnabled (false);
            btnOK.setEnabled (true);
            if (optA.getState ())
                fltCashEarned = 100;
            else
                fltCashEarned = -100;
        }


When they select option button A it just subracts 100 dollars instead of adding it ot the total score.



JeopardyApplet.java
 Description:
Jeopardy game

Download
 Filename:  JeopardyApplet.java
 Filesize:  18.23 KB
 Downloaded:  250 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: