A salesperson will continue to earn a fixed salary of $50,000. The current sales target for every salesperson is $120,000. · The sales incentive will only start when 80% of the sales target is met. The current commission is 10% of total sales. If a salesperson exceeds the sales target, the commission will increase based on an acceleration factor. The acceleration factor is 1.20. The application should ask the user to enter annual sales, and it should display the total annual compensation.The application should also display a table This has to be in a Java code
Do you know how to work a table? The rest is mathematics.
No can you help me
so you want to write a class that will outline the probelm on hand. You already know that you need user input. So I'd suggest using a Scanner or Buffered Reader to get that. Here's a quick skeleton to get your started. class Probelm{ public static void main (String args[]) { // your code goes here } }
here's the Java ApI reference for Scanner: http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Scanner.html. It has very good documentation. be sure to import at the top of your file so it includes your library. From there, you need to build your logic. I'd suggest some variables for your constants. If you need more help, let us know!
hi
hi
I was need help in writing java code for this
ok, where are you stuck? did you read the things I previously posted? Did they make sense?
yes the made lots of sense. how do i do the end part
I'm new to java and it confusing to me
I have to put a table in the code as well
i went to the link it says error page
Oh I'm sorry. Here's another link to the information http://docs.oracle.com/javase/6/docs/api/java/util/Scanner.html.
okay
same think
error
Wow, sorry again. All I did was search Google for Java API Scanner. and click the first link. maybe you'll have better luck just doing the search manually. In general you'll find that Java has plenty of documentation online. Also please post a skeleton of what you have already if you have anything, that way I can critique/ help guide you better.
i downloaded netbean with JDK+bundle for this assignment
No that's simply to get you the users input. aka the numbers they put in. The math needs to be done using variables. For instance . int x = 2, y = 5; int out = x+y;
ok
I do not no where to began i have not started yet on it.
I would say the beginning part is a little confusing i spent a long time trying to find an example of the type of problem i have so i can mirror it.
use that as a guide
I posted a skeleton for you.... I would say that you will learn more from building it yourself than simply copying... anyway. in general your solution will look something like this. gather input. calculate math. output. Does that make sense?
yes thank you
to see an example of the problem will help me get a good visual on how it would look with skecht
makes sense. so in Java. you construct objects as programs right? so in order to get you started you need an object. class One { } then you want to add a main to it. Main methods are run each time an object is executed. If there is no main method, Java will not be able to run the program, so let's add one. class One { public static void main(String args[]) { } } then we want to include some variables, like your salary of $50,000, as int salary = 50,000; and these go inside your main method.
so lets think about the math for a second. you get an input, the annual salary, you check if it's over the limit. if it is, you take the difference between the goal and the input, and multiply it by your compensation rate. this is what you output. Does this help?
yes this helps
Join our real-time social learning platform and learn together with your friends!