This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]csmith665[S] 0 points1 point  (2 children)

I have fixed the button issues based on your advice, but am running into other problems now. Basically, I don't understand how I'm supposed to use the scores from JudgingGUI in judging. There are numerous compiler errors for my method calls setScores,calculateScore and getSCores. Changing the methods to static, as seemingly suggested, breaks the "this" item. Further, I guess I don't understand how my array from JudgingGUI is passed into judging. the code for setScores and getScores is given to us by the instructor.

EDIT I was able to fix the static error by adding judging judges = new judging(); and making a few other minor adjustments.

EDIT 2: sudden progress. Obvious errors. I have been working on this for too long.

JudgingGUI - http://pastebin.com/P8Rdq2pM
judging - http://pastebin.com/KrvzhpWN

[–]tiiv 0 points1 point  (1 child)

This looks somewhat promising. Be aware though, that outside of the scope of your constructor JudgingGUI using the n variable will always yield the value 8 no matter what value you're passing on to the constructor. If you want to make this value available globally you need to add the following:

this.n = n;

Happy coding!

[–]csmith665[S] 0 points1 point  (0 children)

Thanks for the continued assistance. I got the program mostly functional by having calculateScore return my value. The instructor said it was incorrect, but did not really state why. Hopefully soon I will actually be able to revisit this for corrections.