Help coderanch get a
new server
by contributing to the fundraiser

John Beese

Greenhorn
+ Follow
since Jun 16, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by John Beese



This one has proven to be difficult. It compiles and runs but only if i use the regular button first and even still that error message i used as my subject title. Im thinking i should be using an if/this combination, but i really dont know. Any suggestions?
13 years ago
sigh this keeps getting better and better,



its compiles and runs but if i try to use the premium button first i get a whole bunch of errors and it doesnt calculate, if i put in the regular one first, then i can use the premium one runs fine. what gives?
13 years ago
Thanks Henry, i removed those () and the error went away, but 3 more popped up.... heh back to trying to figure this out.
13 years ago
//declaration codes omitted




Ive counted and recounted the brackets almost a dozen times and they are even, could anything else be causing this error?
13 years ago
Im confused, I had 2 classes i needed to delcare a Tax Caculator class and a net Calculator, i did the same thing for both( I think) and i only get an error for the net calculator, Ive been doing this all day and im losing concentration. heres my entire import/ declare statement




this is almost my whole main method minus the clear and close commands



The 2 pieces of code for the CalculateTax and CalcNet have been written and are further down. Are you saying i need to declare it in the import statements section? Gonna rest on it and see if i cant figure it out tomorrow.
13 years ago
So i rewrote the code and most of it works.






Im getting a cant find symbol error message on the NetCalculator netCalculator; line
and the same error on netCalculator = new NetCalculator(grossEarnings,uncleSamsCut);

I used the same code for a dfifferent part of the program and it worked just fine, what gives?



13 years ago

fred rosenberger wrote:That is probably a mistake. if your current code is 200 lines, it is much easier to find the problem now than after writing an additional 200 lines.

right now, you're saying "I can't find the needle in this haystack, so I'm going to add MORE hay, and hope I find it".



well i wish i had read this before i went on writing all this other code, i wrote a bunch more stuff now im getting all sorts of errors from everywhere, and im really confused, Doesnt help Ive been getting pretty frustrated and changing stuff and re changing so now its just a big mess.
13 years ago
Ah ok, this is my first multi class program, I'll finish writing and see what happens. Thanks
13 years ago






These are my 2 sections of code that i think the problem is in. when i complie i get an error message on the public void processJButtonActionPerformed line saying. IncomeTax.java:180: class, interface, or enum expected. Ive googled it and the only thing i can find says i missed a semicolon or misspelled something, but it looks good to me. :/

13 years ago
oh duh, i had it declared as. averageScore = scoreAccumulator. not averageScore = scoreAccumulator / numberOfItems.

Thanks.
13 years ago


Its a grade calculator, It compiles and runs but the only grade it outputs is an F. This is my entire main method. It seems to me like it should work. But I dont know, if i change averageScore to scoreAccumulator, i get it to output an A but no other scores, Also it grades after the first score is entered. Cant figure out where the problem is.
13 years ago





Firstly I've only been doing this for about 4 weeks, Its a homework assignment for an online course. If I didnt know anything about this stuff a month ago, i feel like i know even less now. So if this is some kind of simple mistake or problem i apologize. The assignment is to make a simple grade calculator which is proving to be not so simple.

Edit: I found a set of brackets i missed after reading my post, that took away some error messages but added others. ill have to look over it now. getting incompatible type and cant find symbol error on lines 137 138 144 and 145.
13 years ago