Fixed Salary Java Application

timer Asked: Jun 18th, 2013

Question description

I need help writing this code. Could you please help:

My code so far:

import java.util.Scanner;

 * This program will show that a sales person will earn a fixed salary of $74,000.
 * It will also show that a sales person will also receive an 8% commission as a sales incentive
 * A sum of the fixed salary plus the commission earned.
public class fixedsalary

  * @param args the command line arguments
  public static void main(String[] args) {
  // Indicate the yearly gross pay.6
  int fixedSalary = 74000;
  System.out.println(fixedSalary + " is the yearly gross pay of a sales person.");

  // Display the fact that a sales person will also earn 8% pay of any sales.
  System.out.println("A sales person will also receive an additional 8% of all sales made for the year.");

  // Calculate the total sum of the salary plus the commission earned.
  System.out.println("The total of a sales person's earning's for the year is $" + fixedSalary + ", plus an 8 percent commission on all sales for that year.");

  // Way of input by keyboard.
  Scanner keyboard = new Scanner(;

  // Get the sale's person's annual sales.
  double salesAmount;  //Amount sold for the year
  System.out.print("What was your total sales amount? ");
  salesAmount = keyboard.nextDouble();

  //Example: Sale's Person Response is 10000 in annual sales.

  // Calculate the sales incentive earned.
  double saleIn;  //Total earned ytd.
  int spResponse = 10000;
  saleIn = (spResponse * .13);
  System.out.println("The total incentive is $" + saleIn);
  // Calculate the total income for the year.
  int totalAnualComp = 1000 + 74000;
  System.out.println("The total annual compensation is $" + totalAnualComp );


Write a Java™ application using NetBeans™ Integrated Development Environment (IDE) that calculates the total annual compensation of a salesperson. Consider the following factors:

·  A salesperson will earn a fixed salary of $51,000.

·  A salesperson will also receive a commission as a sales incentive. Commission is a percentage of the salesperson’s annual sales. The current commission is 13% of total sales.

·  The total annual compensation is the fixed salary plus the commission earned.

The Java™ application should meet these technical requirements:

·  The application should have at least one class, in addition to the application’s controlling class (a controlling class is where the main function resides).

·  There should be proper documentation in the source code.

·  The application should ask the user to enter annual sales, and it should display the total annual compensation.

Submit your assignment using the Programming Assignment Sheet (see course materials folder for template).

  - Remember to include a UML Class Diagram and some information regarding the design of your program. 

  - Copy and Paste your code text into the Source Programs section and a screen shot of the results in the Output section. 

  - Describe how you tested the application in the testing section.

Remember that your program must follow the coding conventions found in the Java Coding Conventions document.

Tutor Answer

(Top Tutor) Studypool Tutor
School: UIUC
Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors