Additional and changed business requirements

Assignment Help Business Management
Reference no: EM131466072

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:  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.

Reference no: EM131466072

Questions Cloud

Discuss the management process : Discuss the management process and how implementing the process
What should be included in a development plan : What should be included in a development plan?
Describe the supply chain for your prospective organization : Describe the supply chain for your prospective organization. Where does your organization bring value in this supply chain?
We often use to calculate the distance between two clusters : Briefly explain the four distance measures we often use to calculate the distance between two clusters.
Additional and changed business requirements : Modify the Week Two Java application using NetBeans IDE to meet these additional and changed business requirements:
Plot the power consumed by r one as the resistance changes : For the circuit in Figure, compute the power supplied to the circuit by each of the batteries and the power consumed by each of the resistors.
Create tables to save orders and its items for a store : Create tables to save orders and its items for a store. Then write the SQLs in a transation with SERIALIZABLE isolation level to save a order which has 2 items.
Develop the screens and add a menu to the portal : The home page of GRM is shown in Figure attached. Add a menu to the portal above to Include the menus attached
What steps can be taken to mitigate them : In 200 words What is a business continuity risks related to an organization's data processing function. What steps can be taken to mitigate them?

Reviews

Write a Review

Business Management Questions & Answers

  What factors within each area should be evaluated

Organizational Behaviour- What factors within each area should be evaluated in an Organizational Behaviour Audit? Why are these factors important?

  Tool company is a large u.s based multinational corporation

Solution forGretz Tool Company is a large U.S based Multinational Corporation with subsidiaries in eight different countries. The parent of Gretz provided initial cash infusion to establish each subsidiary. However, each subsidiary has had to finance..

  Performance-successful attainment of security performance

You are to explain how you gauge the performance and successful attainment of security performance as they relate to the daily functions of managing the security organization and the overall business of the company.  In other words, explain how yo..

  Create a report that reviews the currency and efficacy

What is sexual harassment? Recognising sexual harassment. The law and sexual harassment - what is bullying? Identify bullying behaviours. Discuss bullying and the law.

  Why do performance appraisal systems fail

Why do performance appraisal systems fail - Include more real examples either in diagram, table, videos or pictures.

  Team building exercise

Prepare a three-four paged paper describing a Team-Building exercise for Conflict Resolution that you would present in an organizational atmosphere, and how it would be conducted

  Describe the importance for maintaining an ethical culture

Describe the importance and rationale for maintaining an ethical culture within the entire organization. Think about methods that you can use to motivate employees and employers toward ethical business practices.

  Raise prices on elastic products

In detail, please answer: what are some of the challenges that a store is facing if they raise prices on elastic products?

  Equilibrium price and output

Show what will be the equilibrium price and output

  What shipping address to ship your items to

After creating a new account, we next need to know what shipping address to ship your items to. We will also need to have you choose a shipping method.

  Costs price and profitshow the distinctions between costs

costs price and profitshow the distinctions between costs price and profit. include a description of cost analysis and

  Journal article review - organising the body

Briefly describe, discuss and evaluate the key points involved in each section of the article - Does the author clearly define a research problem or topic?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd