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

  Write an application that takes in an array of 30 grades

Write an application that takes in an Array of 30 Grades (integer) and returns the maximum grade, minimum grade, average of all grades, and prints a Bar Chart to show the grade distribution.

  Create a new android application project

You have been hired to create a mobile application for Healthy Life, a local organic bakery and grocery store. The main screen should state the name of the person who owns the phone. Create a new Android Application Project

  What is a java package and how is it used

What is a Java package and how is it used? What are synchronized methods and synchronized statements?

  Write prolog clauses to express therelationships

Write prolog clauses to express the following relationships, given the parent relationship: grand-parent, sibling, cousin.

  Change code in java program so that input of floating point

Change code in Java program so that input of floating point values is possible.

  Write a generic class pair which has two type parameters

I need to write a generic class Pair which has two type parameters F and S (first and second) each representing the first and second elements of the pair. Add get and set elements so that the values of the pair can be changed.

  Program buttons that implements a window with three button

Proper coding conventions required the first letter of the class start with a capital letter and the first letter of each additional word start with a capital letter

  Write the program using a for-loop and a break statement

Write a program that asks the user to enter a number that's positive and a multiple of 4. The user has three attempts to find such a number. Write the program using a for-loop and a ‘break' statement in the loop

  Write a program to solve rsa

Write a program to solve RSA, Use either Java or "VERY DETAILED" pseudocode. Take input for p, q, e, the number to encrypt and the number to decrypt.

  How to apply filter in servlet

Can you do this assignment please help int this how to apply filter in servlet create 3 class and show the filter chaining phenomenon..... Show the working program thanks.............

  Develop a java application

Your task is to develop a Java Application that allows the user to read travel booking data from a text file, save data in a file, display data in a text area, sort data by booking name and search data by booking name.

  Write a short java application

You will write a short Java application that will accept five strings from the user. Each String will be a word in a sentence.

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