Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

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

Why do you think its important to use power verbs and

Why do you think its important to use power verbs and quantifiers on a resume.

Explain the formation of friendship groups such as those

Explain the formation of friendship groups, such as those seen in dorms among first year college students, in terms of these principles: proximity, elaboration, similarity, complementarity, and reciprocity

The initial problem was how alissa would manage locations

The initial problem was how Alissa would manage locations almost an hour apart while maintaining the level of quality and service customers expected. Does this problem require a routine or non-routine decision? Explain y ...

Do you think there is some type of diversity we really

Do you think there is some type of diversity we really aren't interested in? Or, perhaps what we really are looking for is an end to discrimination, but at some point in the last 10-15 years that has morphed into the con ...

If i had to collect and assess the quality and

If I had to collect and assess the quality and appropriateness of data held by a large, multi-national organization. What steps should I take? How would I address network, security, and ethical considerations when decidi ...

You are the director of new business development for your

You are the director of new business development for your company, and your vice president wants to expand into new markets overseas. Your company's core competency is in the area of constructing, staffing, and operating ...

Question 1read the extract below and answer the questions

QUESTION 1 Read the extract below and answer the questions which follow: Stakeholder Engagement The Challenge The fast-changing events of 2008 reinforced how important it is to understand the undercurrents of change that ...

Business process management assignment -assignment -

Business Process Management Assignment - Assignment - Analysing and Designing To-Be Business Process for Swinburne Cares Foundation Outline -   This assignment requires you to  continue working  on the business and proce ...

How are the needs for affiliation intimacy and power

How are the needs for affiliation, intimacy, and power similar to and different from needs for inclusion, control and affection?

Ethical behavior is a critical element for the success of

Ethical behavior is a critical element for the success of any business and business manager. If you were tasked with writing a code of ethics for your company, what concepts would you include and why?

  • 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