Ask Business Management Expert

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

<>

103,765.43

<>

108,765.43

<>

113,765.43

<>

118,765.43

<>

123,765.43

<>128,765.43

<>

133,765.43

<>

138,765.43

<>

143,765.43

<>

The Java application should also meet these technical requirements:  General

  • The source code must demonstrate the use of conditional and looping structures.
  • There should be proper documentation in the source code. That means you should add comments to your code to explain what you're doing.

Program Organization

  • You are not allowed to use any static variables. Your main() method is static, and that's okay.
  • The calculation of the commission will now take place in a separate class, described in the next section.

CommissionCalculator class

  • The application must now have a second class (and .java file). Name it CommissionCalculator. This second class should contain all of the commission calculations. Your current, existing class (CommissionCalculatorApp) will use this new class to do its commission calculations (instead of doing them itself). So, you'll want to move your current commission calculations (where you multiply sales by commission rate to yield commission amount) to this new class, and modify your existing class (CommissionCalculatorApp) to use the new class you're going to create.
  • That means you first have to tell NetBeans to create a new class, called CommissionCalculator. That class should probably have fields for the commission rate, the acceleration factor, and so on. 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 new CommissionCalculator class may not have a main() method.
  • Your CommissionCalculator class is not allowed to have any numerical literal values in it. For example, the value "0.07" cannot appear in the CommissionCalculator class. So where do these values come from? The CommissionCalculatorApp must pass them to the CommissionCalculator object in the CommissionCalculator's constructor. So, the various literal values that come to mind are 0.07, 1.25, 0.8, 120000.0. Any others?
  • Your CommissionCalculator class cannot have any public variables/fields in it. It can, and should, have public methods.
  • 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() assigns annual sales, 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 (using the "new" keyword), 2) prompt the user for input, such as total annual sales, 3) use the new object you just created to calculate the commission (by calling that object's "CalculateCommission()" method), 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?). Remember, your CommissionCalculator class cannot have literal values such as 0.8, 120000.0, 1.25, and so on. Also, it cannot have any public field/variables.
  • 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.

Input

  • This week you must prompt the user for input (the annual sales), then read the user's input. This should be a matter of 1) displaying a prompt (using System.out.println()), such as "Enter annual sales: ", and 2) reading the next value from the keyboard. See the Scanner class for information on reading in values.
  • 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.

Calculations

  • The main() method is not allowed to calculate the commission amount directly; it must call the new CommissionCalculator object to do that (see above). It must, however, calculate the total annual compensation.
  • Use parentheses to explicitly specify the order of operations. Ask questions if you have any.

Output

  • You must display money values (currency) with a dollar sign ($) and exactly two decimal places. You need not use commas.
  • The table above doesn't need borders, etc. You just need to display two columns of numbers, with a header (Total Sales Total Compensation).
  • None of the primitive types (float/double/int/etc.) store just 'n' decimal places. The float and double store as many as they can. So, the technique is to format your variable value when you print it out. There are several around, and one that's pretty standard and easy to use it the DecimalFormat class. Google it, "Java DecimalFormat." You can copy/paste any code you find and understand, but only for the DecimalFormat usage.

Business Management, Management Studies

  • Category:- Business Management
  • Reference No.:- M92274811
  • Price:- $30

Priced at Now at $30, Verified Solution

Have any Question?


Related Questions in Business Management

Name a company that addressed a recent ethical problem in a

Name a company that addressed a recent ethical problem in a positive way. Also, explain how or if this positively affects us as a community?

When it is appropriate to use the trade-off process what

When it is appropriate to use the trade-off process. What conditions apply, and the technical evaluation criteria that might be used?

Need help with a essay with the following phrase for

Need help with a essay with the following phrase for analyzing : " Capitalism is at the heart of how people and organisations are managed in contemporary society" May i ask for a better explanation of the question? Also ...

How could these three tenets of the auburn creed be used to

How could these three tenets of the Auburn Creed be used to motivate others: "I believe that this is a practical word and that I can count only on what I earn. Therefore, I believe in work, hard work." "I believe in educ ...

How can these two tenets of the auburn creed by used in

How can these two tenets of the Auburn Creed by used in addressing teamwork issues: "I believe in honesty and truthfulness, without which I cannot win the respect and confidence of my fellow men." "I believe in the human ...

Discuss the advantages of having and interacting in a

Discuss the advantages of having and interacting in a diverse workplace. Consider the wide range of ideas and perspectives that a range of team members bring to a team, that are of differing ages, ethnic backgrounds and ...

Parmigiano-reggiano global recognition of geographical

Parmigiano-Reggiano: Global Recognition of Geographical Indications What historical factors have helped support the consortium's claims for the geographic specificity of Parmigiano-Reggiano and Parmesan? What are the eco ...

Communication planthis communication plan will be a roadmap

Communication Plan This communication plan will be a roadmap on how the new division will best be able to communicate with Biotech's corporate headquarters, suppliers, other divisions, and internally. This should lay out ...

Discuss strategies to obtain feedback from a customer and

Discuss strategies to obtain feedback from a customer and clients when working in sales.

Describe different networking methods and the advantages

Describe different networking methods and the advantages and disadvantages of them?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As