Hello I am learning
Java in Net Beans and I unfortunately got behind on my assignment because a relative passed away on my brother in law's side and I had to take some down time to support my sister's family. Now I have already accepted my assignment will probably be late because it's due tonight and there's just no way. I did try to get a head start but I'm just going to be straight up honest I do not understand where to even begin with my assignment. I know it's not your policy to do homework. I am not asking this. But any pointers, advice or a link to something that may help would be much appreciated!
There are two parts to my assignment.
To understand the assignment I must share the part of the assignment from last week which is finished and a tad unpolished I know.
First class...
Now the part of the assignment I'm now working on is in a second class attached. I will repeat yet again I have no idea what I am doing... sadly
The first part of the assignment is to change the commission that the employee doesn't start earning commission until they've earn up to 80% or more of the company goal of $120,000.
Now my instructor keeps telling me that I'm not creating the method right and I'm sure he's right but I don't really know... how to fix it...
The second part is to create a sample table showing potential annual compensation in $5000 increments.
The table I have a kind of idea of how to do the table but I just don't know where to start... I wish I had an example to go off of...
Now if I could have that "Ah hah!" moment on even just one of these... I would be so happy! I think a good place to start is to first focus on the 80% part and then worry about the sample table after.
Here are the assignment instructions if anyone is curious...
"Modify the Week Two Java application using NetBeans
IDE to meet these additional and changed business requirements:
The company has recently changed its total annual compensation policy to improve sales.
A salesperson will continue to earn a fixed salary of $12,000. The current sales target for every salesperson is $120,000.
The sales incentive will start only when 80% of the sales target is met. The current commission is 7% of total sales. For example, if my target is $120,000, 80% of that is $96,000. If I sell $95,000, I get no commission. If I sell $96,000, I get 7% of that amount.
If a salesperson exceeds the sales target, the commission will increase based on an acceleration factor. The acceleration factor is 1.25. If my target is $120,000 and I sell $120,000, my commission is 7% of that amount. If I sell $121,000, then my commission is 7% of $120,000, PLUS (7% of $1,000 multiplied by 1.25).
The application should ask the user to enter annual sales, and it should display the commission amounts (regular and accelerated), salary, commission rate, and the total annual compensation.
The main() method in the application should also display a table of potential total annual compensation that the salesperson could have earned, in $5,000 increments above the salesperson's annual sales, until it reaches 50% above the salesperson's annual sales. The table should start at the current total sales.
Sample Table: Assuming a total annual sales of $98,765.43, the table would look like this:
Total Sales
Total Compensation
98,765.43
<<Program calculated value>>
103,765.43
<<Program calculated value>>
108,765.43
<<Program calculated value>>
113,765.43
<<Program calculated value>>
118,765.43
<<Program calculated value>>
123,765.43
<<Program calculated value>>
128,765.43
<<Program calculated value>>
133,765.43
<<Program calculated value>>
138,765.43
<<Program calculated value>>
143,765.43
<<Program calculated value>>
The Java application should also meet these technical requirements:
You are not allowed to use any static variables. Your main() method is static, and that's okay.
The application must now have a second class (and .java file). Name it CommissionCalculator. This second class should contain all of the commission calculations. So, for example, move your calculation (where you multiply sales by commission rate to yield commission amount) to this new class.
That means you first have to tell NetBeans to create a new class, called CommissionCalculator. That class should probably have a single field for the commission rate. It should probably also have a method called CalculateCommission, which takes a sales amount as an argument. It would multiply that amount by the rate and return the commission amount. (If all this sounds like gobbledy-gook, ask questions in class!)
Your week 2 project and class are called CommissionCalculatorApp (the "App" at the end stands for "application"). That class has a "main()" method in it. Currently, from week 2, the code in main() prompts the user for input, performs some calculations, and displays the results of the applications. This week you must take the commission calculation out of main() and put it into a method in CommissionCalculator (not CommissionCalculatorApp).
So,
you should modify your main() method to 1) create a new CommissionCalculator object, 2) prompt the user for input, such as total annual sales, 3) use the new object you just created to calculate the commission, 4) in your main() method, calculate total annual compensation, etc., 5) in your main() method, display the results of the calculations, and 6) in your main() method, calculate values for the table and display those values in table format.
The additional class must have member variables (such as the commission rate already mentioned; any others come to mind?).
The additional class is not allowed to display anything.
The additional class is not allowed to input/read anything from the keyboard.
The additional class is not allowed to refer to any variables in the CommissionCalculatorApp class by name. This means that the only variables the CommissionCalculator class can use are 1) its own variables, 2) automatic variables, and 3) methods can refer to their arguments.
The additional class is not allowed to calculate total compensation.
The main() method is not allowed to calculate the commission amount. It must, however, calculate the total annual compensation.
The source code must demonstrate the use of conditional and looping structures.
There should be proper documentation in the source code.
The table above doesn't need borders, etc. You just need to display two columns of numbers, with a header (Total Sales Total Compensation).
You must display money values (currency) with a dollar sign ($) and exactly two decimal places/ You need not use commas.
Use parentheses to explicitly specify the order of operations. Ask questions if you have any.
When I test/run your program I might enter negative numbers, or 0 when asked to input data (such as annual sales). Your program should check for that, complain if it finds a problem, and ask again (and ask again and again, until I enter valid data). You have to determine if the number is valid. For example, is 0 a valid number when entering annual sales? Is -1000?
When I test/run your program I will not enter data that might cause your program to crash. For example, if you ask for a number, I will always enter a number; I won't enter "xyz."
When you ask for annual sales, I will input just a number, possibly with a decimal point and cents. I will not input a dollar sign nor will I enter a comma."