Bookmark Topic Watch Topic
  • New Topic

if statements  RSS feed

 
Greenhorn
Posts: 13
Chrome Netbeans IDE
  • Mark post as helpful
  • send pies
  • Report post to moderator
I can't get my program to run my if statement correctly. If i enter 120,000 for total sales it should come out to 7,920 compensation at 6.6%, but it is still only calculating at 4.5% commision rate.Any pointers?

 
Author and ninkuma
Marshal
Posts: 66307
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Report post to moderator
Check the syntax of your if statements very very carefully.
 
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Report post to moderator
I missed the error at first; I was wondering how on earth the code compiled in the first place.
 
Jonathan Mckulsky
Greenhorn
Posts: 13
Chrome Netbeans IDE
  • Mark post as helpful
  • send pies
  • Report post to moderator
So i changed things up but I am still getting an error for cannot find symbol.

 
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Report post to moderator
it's gonna be much easier for us to help you if you post the exact and complete error message.
 
Jonathan Mckulsky
Greenhorn
Posts: 13
Chrome Netbeans IDE
  • Mark post as helpful
  • send pies
  • Report post to moderator
cannot find symbol

symbol: method calculateTotalCompensation(double)
location: variable Salesperson1 of type Salesperson1

thus error is on line 39 and 46
 
Jonathan Mckulsky
Greenhorn
Posts: 13
Chrome Netbeans IDE
  • Mark post as helpful
  • send pies
  • Report post to moderator
Can anyone provide any feedback?
 
Sheriff
Posts: 11496
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
I am going to lock this thread now since you asked the question in a different thread, to which I have already posted a reply.

See here: https://coderanch.com/t/678623/java/find-symbol-error
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!