Calculate total annual compensation of a salesperson

Assignment Help JAVA Programming
Reference no: EM131069278

This program was designed using NetBeans IDE. The program is intended to calculate total annual compensation of a salesperson. Below is the code that was used to develop the program with the reasons each was used. This program was then tested in NetBeans and ran in NetBeans to determine if the program runs correctly after being built. The program was successfully ran in NetBeans and also in Windows command prompt as shown in the screen shots.

CODE

/*

 * 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.

 */

packagecommissioncalculation;

// This program will calculate the total annual compensation of a salesperson.

importjava.util.Scanner;

/**

 *

 * @author Michael Formet

 */

public class CommissionCalculation

{

    /**

     * @paramargs the command line arguments

     */

    // This is the beginning of the main method

public static void main(String[] args)

    {

          // always print your last name as the first output of your program

System.out.println("Formet");

        Scanner input = new Scanner(System.in);

        // This method displays the salesperson's fixed annual salary

doublemonthlySalary= 30000; // Salesperson's fixed monthly salary

doubleannualSalary= monthlySalary * 12; // Salesperson's fixed annual salary , 12 represents months in a year

System.out.println("The Salesperson earns a fixed monthly salary of $"+ monthlySalary + ".");

System.out.println("The Salesperson earns a fixed annual salary of $"+ annualSalary + ".");

        // This method displays the salesperson's commission rate

int commission= 5;

System.out.println("The Salesperson will receive a commission of "+ commission + "%.");

        // Creates Scanner to collect annual sales input from salesperson

doubleannualSales; // Salesperson's annual sales

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

annualSales = input.nextDouble();

doublecommissionCalc; // Calculates commission of annual sales

doublepercentCalc = commission/100.0; // Makes commission calculable

commissionCalc = annualSales * percentCalc;

System.out.println("The annual sales of the salesperson is $"

                          + commissionCalc + " using a " + commission

                          + "% commission.");

doubletotalAnnualSum; // Salesperson's total annual compensation

totalAnnualSum = annualSalary + commissionCalc;

System.out.println("The total annual compensation of the salesperson "

                         + "is: $" + totalAnnualSum + ".");

    } // end main method

}

Attachment:- CommissionCalculation.rar

Reference no: EM131069278

Questions Cloud

Computing the book closing line : In an inevitable climactic twist, it will turn out that the Catholic Church had nothing to do with anything. The real villain does not dress in scarlet or purple but is better known for being green. He has lured the flies to Italy for lunch. Who i..
Describe database backup : This paper will be 5 pages total: (a) Describe Database Backup. (b) Describe Disaster Planning. (c) Highlight the importance of the integration of both backups and disaster planning and the impact if both are not effectively executed.
Stability of the islamic financial system : Evaluation of the reasons behind the stability of the Islamic financial system during the recent financial crisis
Tiny lettering on a lily pad : The first clue, found inscribed in tiny lettering on a lily pad, will read, "Fruit flies like a banana". It is signed by "Ferret Goth Kim" but, remind me, who is it that first came out with this quote?
Calculate total annual compensation of a salesperson : Develop the program with the reasons each was used. This program was then tested in NetBeans and ran in NetBeans to determine if the program runs correctly after being built.
Responsibility and corruption on elm avenue : How does the authormostdevelop Howard's character over the course of the passage in the story "Responsibility and Corruption on Elm Avenue" by Corbitt Nesta?
Piece of fiction or nonfiction literature : Be sure that you have indeed compared or contrasted your novel choice to another piece of fiction or nonfiction literature from the same time period.
Problem regarding the ethical controversy : Identify a current ethical controversy that you want to learn more about in business, media, technology, medicine, or bioethics. Write a three-page analysis on the major sides in the controversy. In your analysis paper, you need to:
What are the primary sources of revenue for health care : What are the primary sources of revenue for health care? Can you explain revenue cycle management and how it affects the amount of revenue generated and cash flow for a health care entity?

Reviews

Write a Review

 

JAVA Programming Questions & Answers

  Characteristics and features of programming in java

Discuss the principles, characteristics and features of programming in Java - critically evaluate the environmental flexibility of programming in Java.

  Design constraintsyour program should confirm to the

design constraintsyour program should confirm to the following constraints.nbsp it shouldinclude at least one example

  1 linked listsin this problem you will write a class that

1 linked listsin this problem you will write a class that implements an ordered list of strings. your class will able

  Create a 2d array of randomly generated ints

Write a complete Java class that will create a 2D array of randomly generated ints that of size 5 rows and 10 columns. Print the values of each cell to a 5x10 table.

  Multiple inheritance and casts

An important aspect of C++ object and virtual function table (vtbl) layout is that if class D has class B as a public base class, then the initial segment of every D object must look like a B object, and similarly for the D and B virtual function ..

  Write a test application name employeetest

Create two Employee objects and display each objects yearly salary. Then give each employee a 10% raise and display each employee's yearly salary again.

  Implement an inheritance hierarchy based on the following

Implement an inheritance hierarchy based on the following specifications for Account class, Checking Account class, and Savings Account class Methods: processDeposit ( ) - accepts a single double parameter containing the deposit amount. Updates the ..

  Determine the unit product cost of one pound

Determine the unit product cost of one pound of the Kenya Dark coffee and one pound of the Viet Select coffee and determine the unit product cost of one pound of the Kenya Dark coffee and one pound of the Viet Select coffee.

  Application that displays a menu of three items in a resto

Modify the application in Ã?xercise 9a so that if the user makes a menu selection he or she has already made, ignore the selection - this is, do not add a second price for the same item to the total. The user is still allowed only three entries

  Java programming using netbeand

Java Programming using Netbeand- In this assignment, you will be asked to demonstrate what you have learned in the Discussion Board in terms of vector, wrapper classes, conversion, and collection data structures by writing and implementing Java co..

  Update your website to include a simple web form

Update your website to include a simple web form as discussed in your design document. Use JavaScript to validate the form contents and display the results of that validation to the user in a popup window

  Compare swing java gui components to awt components

Compare Swing Java GUI components to AWT components. Explain at least one way the components are similar and at least one way they are different.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd