Calculate the total commission received by a salesperson

Assignment Help Programming Languages
Reference no: EM131266213

Assignment

The following program attempts to calculate the total commission received by a salesperson who earns 7% on sales of product A which total less than $40,000 and 10% on the amount of sales above $40,000. For example, a sale of $50,000 would earn a commission of $3800. The salesperson receives a commission of 5% on sales of product B under $20,000, 6.5% on the amount of sales over $20,000 but under $50,000, and 7.5% on the amount over $50,000. Find and correct any errors in this program:

public class Commission {

public static void main(String [] args) {

Console.Write("Enter the amount of Product A sales: ");

double salesOfA = double.Parse(Console.ReadLine());

Console.Write("Enter the amount of Product B sales: ");

double salesOfB = double.Parse(Console.ReadLine());

double amount = 0;

if (salesOfA < 40000.00)

amount += .07 * salesOfA;

else

amount = .1 * (salesOfA - 40000.0);

if (salesOfB 20000.00 || salesOfB < 50000.00)

amount += 1000 + .065 * (salesOfB - 50000.00);

else

amount = .075 * (salesOfB - 50000.00);

Console.WriteLine("The commission is {0}",amount);

}

}

The program output should verify these test cases table:

https://wikisend.com/download/529804/image2.png

File ID: 529804

Deliverables:

This solution submission template must be used:

https://wikisend.com/download/630496/Submit

File ID: 630496

The deliverable is a Word document that includes:

1. Zip file of all of your VS project files so that it could be loaded and run in another VS

2. A copy of your source code

3. Screenshot of your output

4. Explanation of your work and how you arrived at your solution.

Reference no: EM131266213

Questions Cloud

Find the maximum allowable value of p : The inverted T-beam supports three concentrated loads as shown in the figure. Find the maximum allowable value of P if the bending stresses are not to exceed 3.5 ksi in tension and 8 ksi in compression.
Would enhanced intercultural communication competence help : In a 250-300 word response, critically examine your personal level of intercultural communication competence. Is it important for you to achieve a certain level of intercultural communication competence? Would enhanced intercultural communication ..
How uber is increasing efficiency in ride for fare market : Write an essay about how Uber is increasing the efficiency in the ‘ride for fare' transportation market.- Include some of the information in the essay.
Can identify and reduce likelihood of barriers interfering : In a 250-300 word response, identify what techniques you can implement to improve the likelihood that your communications will be received and understood as you intended. Can you identify and reduce the likelihood of barriers interfering with t..
Calculate the total commission received by a salesperson : The following program attempts to calculate the total commission received by a salesperson who earns 7% on sales of product A which total less than $40,000 and 10% on the amount of sales above $40,000.
Develop a simple linear regression model : Develop a simple linear regression model based on least squares that predicts advertising revenue per page from circulation (i.e., feel free to transform either the predictor or the response variable or both variables). Ensure that you provide jus..
What fields do you think should appear in a certificate : What are the root SSL keys hard-coded within your Web browser of choice? When were these keys created? When do they expire?
What is peer learning : What is active learning? How could active learning principles be applied in a safety training course on machine guarding?
Write a program that asks for the users age : Write a program that asks for the user's age. Based on their response print "You can vote" (18 years old or older) or "You can't vote" and also whether or not he/she is a senior citizen (over 64). If senior citizen print "You're a Senior Citizen.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a paper on memory management

Write a paper on Memory Management

  How to use bit vector to represent dynamic set of distinct

Explain how to use a bit vector to represent a Dynamic Set of Distinct Elements with no Satellite Data. Dictionary Operations must Run in O (1) Time.

  Write application to simulate coin tossing

Write an application that simulates coin tossing. Let the program toss the coin each time the user presses the "Toss" button. Count the number of times each side of the coin appears.

  Write a perl program that asks a user for a motif

Write a Perl program that asks a user for a motif (like QDSV or MKPL) and returns a message saying whether the motif is found in the sequence or not - Write a program that calculates and prints

  Data transmission

Data Transmission.  Please respond to the following: Compare the four items related to channel capacity: data rate, bandwidth, noise, and error rate.  Determine the most important and justify its significance over the remaining items.

  Html and php for creating dynamic web pages

Html and PHP for creating dynamic web pages

  Find out the total of balances

Display all the contents of the file in a tabular format with the first row being a header row and write to a file that is called account numbers.txt only the account numbers from the read file.

  Draw a flow chart to outline how you want to solve

Those cards should be revealed for the remainder of the game - you are required to draw a flow chart to outline how you want to solve this problem.

  Write down two ways to execute the shell script

Write down two ways you can execute the shell script when you don't have executive access permission for file containing the script?

  Write a web application which will give report of balance

Write a web application which will provide a report of the balance held in the visitor's account during the past several months.

  Develop a class which is called decimalclass

Develop a class which is called DecimalClass. This class has two data members. The first one is an integerPart and the second is a decimalPart. For example if num1 is an object of Decimal Class and its integerPart is 100 and decimalPart is 33, the..

  Design and write a program

Design and write a program, using functions, that calculates the area and perimeter of a rectangle whose dimensions (length and width) are provided by a user.

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