SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 1 Day Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 18 Nov 2017 My Price 9.00

compare the total annual compensation of at least

I need to change the code below to meet these 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.

Here is the code I have

 

/*

 * To change this license header, choose License Headers in Project Properties.

 * To change this template file, choose Tools | Templates

 * and open the template in the editor.

 */

package salarycompensation;

 

import java.util.Scanner;

 

 

public class salarycompensationImpl extends salarycompensation {

  public static void main(String[]args){

  Scanner user_input = new Scanner (System.in);

   

  System.out.println("Welcome to the Compensation Calculator");

  double salary = 35750;

    //this is the base salary

  System.out.println("Your annual salary is" + salary);

  double commRate = .12;

    // this is the commission rate

   double yrlySales;

    //this is the total yearly sales

   System.out.println("Please enter your yearly sales total");

    Scanner sc = new Scanner(System.in);

     

import java.util.Scanner;

 

public class SalesDriver {

 

  public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

    SalesPerson salesPerson = new SalesPerson();

 

    System.out.print("Enter your current annual sales: $");

    double sales = input.nextDouble();

 

    salesPerson.setAnnualSales(sales);

    System.out.println("Current salary: $" + salesPerson.getSalary());

 

    System.out.println("Estimated amount from commission: $" + salesPerson.getCommissionAmount());

 

    System.out.println("Total compensation is expected to be: $" + salesPerson.getCompensation());

    //potential sales

    System.out.println("Total SalestTotal compensation: ");

    double target = 1.5 * sales;

     

    for (double x = sales; x <= target; x += 5000) {

      salesPerson.setAnnualSales(x);

      System.out.println(x + "t" + salesPerson.getCompensation());

    }

 

  }

}

 

 

 

public class SalesPerson {

 

   

  double fixedSalary = 35750.00;

  double incentive = 80;

  double salesTarget = 125250;

  double accelerationFactor = 1.75;

  double percentageCommission = 12;

  double totalCommision = 0;

  double sales = 0;

 

  public void setAnnualSales(double sales) {

    this.sales = sales;

  }

 

  public double getSalary() {

    return this.fixedSalary;

  }

 

  public double getCommissionAmount() {

 

    if (sales >= salesTarget) {

      totalCommision = (sales * (percentageCommission / 100 * accelerationFactor));

 

    }

 

    if (sales <= salesTarget && sales >= (incentive / 100 * salesTarget)) {

      totalCommision = (percentageCommission * sales / 100);

    }

    return totalCommision;

 

  }

 

  public double getCompensation() {

 

    return getCommissionAmount() + fixedSalary;

  }

 

}

Answers

(5)
Status NEW Posted 18 Nov 2017 01:11 PM My Price 9.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)