ScholarMatic | 24/7 Homework Help

ScholarMatic Will Help You Write Your Essays and Term Papers

Answered » You can buy a ready-made answer or pick a professional tutor to order an original one.

Change Java application below using NetBeans IDE to meet these additional and changed business requirements:

by | Nov 28, 2023 | computer science

Change Java application below using NetBeans IDE to meet these additional and changed business requirements:

  • The application will now compare the total annual compensation of at least two salespersons.
  • It will calculate the additional amount of sales that each salesperson must achieve to match or exceed the higher of the two earners.
  • The application should ask for the name of each salesperson being compared.

The Java application should also meet these technical requirements:

  • The application should have at least one class, in addition to the application’s controlling class.
  • The source code must demonstrate the use of Array or ArrayList.
  • There should be proper documentation in the source code.

______________________________________________________________________________________________________________________________

import java.util.Scanner;

/**

 *

 * @author Deneshia Lamar

 */

public class CommissionCalculatorApp {

  /**

   * @param args the command line arguments

   */

  public static void main(String[] args) {

      try (Scanner input = new Scanner(System.in)) {

          System.out.println(“Please enter Annual Sales:”);

          double annualSales = input.nextDouble();

          double TotalCompensation; //Total annual compensation

          double AnnualSales = 0;

          double half = annualSales * .50;// 50% of salesperson total annual sales

          double initAmount = annualSales;

          System.out.printf(“n%15s %15sn”, “Total Sales”, “Total Compensation”);

          for (double i = initAmount; i <= (initAmount + half); i += 5000.0) {

              TotalCompensation = AnnualSales;

              System.out.printf(“$%15.2f $%15.2fn”, i, TotalCompensation);

          }

      }

  }  

}

——————————————————————————————————————————————————————————————————————-

/*

A Sales person will earn a fixed salary of $12,000 every year.

The target sale for each sales person is $120,000.

The sale incentive will start only when the sales met 80% of the sales target.

The current sales commision is 7% in each sale. If a sales person exceedes the

target sale their commision will increase by 1.25%.

 */

/**

 *

 * @author Deneshia Lamar

 */

public class Salesperson{

  private final int fixed = 12000;// Fixed annual sales.

  private final double target = 120000; //Sales person extimated target sales.

  private final double acceleration = 1.25;// If salesperson exceeds the target sales, the commission will increase based on an acceleration factor.

  private final double commissionRate = 0.07; //Current commission of total sales.

  public double getCommission(double totalSale) {

      double commissionEarned = 0.0;

      if (totalSale >= target) {

          commissionEarned = totalSale * acceleration * commissionRate;

      } else if (totalSale >= (0.80 * target) && (totalSale < target)) {

          commissionEarned = totalSale * commissionRate;

      }

      return commissionEarned;

  }

  public double TotalCompensation(double totalSale) {

      double totalCompensation = fixed + getCommission(totalSale);

      return totalCompensation;

  }

}

ScholarMatic: Explanation & Answer

Your ready answer from a verified tutor is just a click away for as little as $14.99


  

Click Order Now to get 100% Original Answer Customized to your instructions!

HOME TO CERTIFIED WRITERS

Why Place An Order With Us?

  • Certified Editors
  • 24/7 Customer Support
  • Profesional Research
  • Easy to Use System Interface
  • Student Friendly Pricing

Have a similar question?

PLAGIRAISM FREE PAPERS

All papers we provide are well-researched, properly formatted and cited.

TOP QUALITY

All papers we provide are well-researched, properly formatted and cited.

HIGHLY SECURED

All papers we provide are well-researched, properly formatted and cited.

ScholarMatic: Get Started

Assignment Writing Service

Feel safe and secure when placing an order on our portal!
Fruitful cooperation begins with solid guarantees, and we are professional enough to promise perfect results. Let’s get it started!