Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Modify the Week Two console based, non-GUI Java application using NetBeans IDE t

ID: 3839685 • Letter: M

Question

Modify the Week Two console based, non-GUI 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 $24000. The current sales target for every salesperson is $120000. The sales incentive will only start when 80% of the sales target is met. The current commission is 4.2% of total sales. If a salesperson exceeds the sales target, the commission will increase based on an acceleration factor. The acceleration factor is 1.6. The application should ask the user to enter annual sales, and it should display the total annual compensation. The application should also display a table of potential total annual compensation that the salesperson could have earned, in $5000 increments above the salesperson's annual sales, until it reaches 50% above the salesperson's annual sales.

Explanation / Answer

import java.util.Scanner;


public class DriverCalculator {
public static void main(String args[]){
double annualSales;
SalesPerson person;
Scanner input=new Scanner(System.in);
System.out.print("Please enter your total sales for the year: ");
annualSales=input.nextDouble();
person=new SalesPerson(annualSales);
System.out.println(" Your total compensation for the year: $"+String.format("%.2f", person.getTotalAnnualCompensation()));


System.out.println("Total Sales total compensation ");
annualSales= annualSales;
int upperlimit = (annualSales/2)/5000;
for(int i=0;i<=upperlimit;i++){
person=new SalesPerson(annualSales);
System.out.println("$"+ annualSales+" "+"$"+String.format("%.2f", person.getTotalAnnualCompensation()));
annualSales+=5000;
}

Program salesperson.java


public class SalesPerson
{
double fixedSalary;
double annualSales;
double commission;
double target;
public SalesPerson(double annualSales)
{
this.annualSales=annualSales;
target=140000;
commission=0;
if(annualSales>target*0.8)
{
if(annualSales<target)commission=0.25*annualSales;
else commission=0.25*1.25*annualSales;
}
fixedSalary=75000;
public double getTotalAnnualCompensation()
{
return fixedSalary+commission;
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote