Ask your own question, for FREE!
Computer Science 4 Online
OpenStudy (anonymous):

I need help in writing a java code for this. A sales person fixed salary is $50,000. A sales person will also receive a commission as an incentive. commission is a percentage of the sales person annual sale. The current commission is 10% of the total sales The total annual compensation is the fixed salary plus the commission earned. Need help in java code for this please.

OpenStudy (anonymous):

TAC= FS+CE What specifically do you need to write?

OpenStudy (anonymous):

you could create a small method that takes in Total sales earned Public int totalSalary( int totalSale) { int percent= .10 * totalSale; intTotalSalary= fixedSalary+percent; return TotalSalary; }

OpenStudy (anonymous):

The code using netbean

OpenStudy (anonymous):

Would it be perfect if I just do a small method like u have

OpenStudy (anonymous):

I would type this in under the public void section correct. would I have to figure it out at the exit part

OpenStudy (anonymous):

i dont know what netbean is, sorry

OpenStudy (anonymous):

it is a java program in helping to write code instead of using command

OpenStudy (anonymous):

it through java Oracle

OpenStudy (anonymous):

is this all I would need for this code liliy

OpenStudy (anonymous):

ya. i think so.

OpenStudy (anonymous):

okay I thought I would have to figure out the total for the exit portion

OpenStudy (anonymous):

You need to write a method for the salary of the salesman, which is dependent on the total sales. So you would write a method that takes an int as argument for total sales, and returns the total salary as another int (Since we can probably assume the commission gets rounded to the nearest dollar): public int calculateTAC(int totalSales) { int ce = totalSales/10; int tac = 50000 + ce; return tac; } So basically what liliy already said, except his piece of code was missing the method definition around it

OpenStudy (anonymous):

Nevermind my bad, I didn't see the public int on the first line :/

OpenStudy (anonymous):

this is all I would need

OpenStudy (anonymous):

so just enter this liliy

OpenStudy (anonymous):

Thank you

OpenStudy (anonymous):

is this what I would need to put in meepi

OpenStudy (anonymous):

Welcome

OpenStudy (konradzuse):

There is more that you need, but you should know if your program outputs correctly or not ;).

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!