Question: you helped me with a Java Programming Question The instructions are as follows: Modify the Week Three Java application using NetBeans IDE to meet these

you helped me with a Java Programming Question

The instructions are as follows:

Modify the Week Three Java application 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.

Submit your Java application file using the Assignment Files tab.


Here is what my week 3 is and I add your information and it doesn't work. 

/*Individual Week 2 Java Assignment


package commission;

import java.util.Scanner;

/**
 *
 * @author Kr5975
 */
public class Commission {

    /**
     * @param args the command line arguments
     */
 
    public static void main(String[] args) {
     
        Scanner sc = new Scanner(System.in);
            System.out.println("Enter the Total Annual Sales of the Person");// Request for User Input for Annual Sales
           int annualsales = sc.nextInt();// Read the input as Integer and assign it to annualsales variable
          System.out.println("With an  Annual Salary of $100,000 and 5 % commision on total annual sales" );//display the salary and commision rate
       
       Salesperson sp = new Salesperson(annualsales);//To create an Instance of a new sales person
     
     
       System.out.println("The Annual Compensation is " + sp.getTotalAnnualCompensation());
       //Calculates the annual compensation and gives the output
   
       // TODO Auto-generated method
  int salary =100000;
  System.out.println("Total Sales    Total Compensation");
                for(int i =100000;i<=150000;i=i+5000){
     if(i>=0.8*120000){
      salary+=0.05*i;
      System.out.println("$"+i +" t$"+salary);
     }
     else if (i>120000){
      salary+=0.05*1.25*i;
      System.out.println("$"+i +" t$"+salary);
     }
     else{
      System.out.println("$"+i +" t$"+salary);
     }
   }

 
        }
    }


package commission;

/**
 *
 * @author KR5975
 */
public class Salesperson {
   
// fixed salary variable

double fixedSalary;

// variable of the value of salepersons annual sales

double annualSales;

//commission earned

double commission;

public Salesperson(double annualSales){

this.annualSales=annualSales;

commission=0.05*annualSales;//The current commission is 5% of total sales.

fixedSalary=100000;//The set fixed salary is $100000

}

public double getTotalAnnualCompensation(){// Calculate total annual compensation this is the fixed salary and add the commission earned

return fixedSalary+commission;

}

}

Step by Step Solution

3.54 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres the revised code incorporating the best aspects of previous responses and addressing identified issues Java import javautilArrayList import java... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!