The amount of sales as input and outputs the total amount

Assignment Help Basic Computer Science
Reference no: EM13318798

A sales person gets a base salary of $200. They also get 3% of any sales between $500 and $1000 and 5% of any sales over $1000. Write a driver program named Commission.java that takes in the amount of sales as input and outputs the total amount earned (the base salary plus commission). Make certain the output looks like money. Include a sentinel controlled while loop that ends when you type in -999 for the sales. Also keep track of the total amount of money for all salespeople and how many total sales people there are (a counter and an accumulator).

NOTE: this is calculated like income tax in the US. If a person sells $700, they get zero on the first $500 and 3% of the next $200 or $6.00 commission for a total salary of $206.00. If they sell $2500, they get zero on the first $500, 3% of the next 500, and 5% of anything over $1000.

Sample output:
Enter amount of sales (-999 to end):10
You earned $0.00 in commission for a total $200.00 salary.

Enter amount of sales (-999 to end):500
You earned $0.00 in commission for a total of $200.00 salary

Enter amount of sales (-999 to end):5000
You earned $215.00 in commission for a total of $415.00 salary.

The number of employees is 3 and the total paid out is $815.

Reference no: EM13318798

Questions Cloud

Define the diffie-hellman key exchange : Define the Diffie-Hellman key exchange? How is this information relevant to you?
Examine the interview structure presented in the sequencing : Examine the interview structure presented in the sequencing
Perform the physical design : Perform the physical design and implementation using SQL Data Definition Language
Design an e?cient algorithm to handle a sequence : Design an e?cient algorithm to handle a sequence of such operations.
The amount of sales as input and outputs the total amount : A sales person gets a base salary of $200. They also get 3% of any sales between $500 and $1000 and 5% of any sales over $1000. Write a driver program named Commission.java that takes in the amount of sales as input and outputs the total amo..
Ethics begins at home explain : Business ethicists claim that the recent spate of business leaders, especially bankers, who have admitted to unethical behavior, is not surprising. In fact, these experts explain that when rewards are high and risks are low, the brain often giv..
Ceo of marketing plus : Write a persuasive email message to Dick Elders founder and CEO of Marketing Plus.
Most data mining applications include intelligent systems : Most data mining applications include intelligent systems, such as artificial neural networks (ANN) and rule induction methods for expert systems (ES), to search for potentially profitable ________ in data.
Describe four approaches to understanding stress : 1.Describe four approaches to understanding stress. How does each add something new to our understanding of stress? Talk about the new research that says that stress can be managed in positive directions if an individual recognizes it and man..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Subsets of integers which sum to the same number

How many numbers do you require from this generator to guarantee that there exist 2 subsets of integers which  sum to the same number? Write steps how derive the solution.

  Provide a recursive definition of sequence s

provide a recursive definition of sequence S of all Binary strings starting with 1. Include the base case, recursion and restriction.

  Differences between technical and technology skills

Describe in scholarly detail differences between technical and technology skills as they associate to telecommunications and how they relate to general expectations

  Write a program that computes the area of trapezoid

Write a program that computes the area of Trapezoid. Unknown values should be input by user.

  What are ids and ips

Write a 2-3 page paper that fully answers the questions.

  The set binary divisible by 4 when interpreted as an integer

The set of binary strings which are divisible by 4 when interpreted as an integer value

  Why your program should require o(logn) time per order

The double action system operates as follows. When a new buy order of $x arrives it is simply stored for future use if none of the stored sell orders has an asking price lower than or equal to $x.

  What is the asymptotic complexity of the following function

What is the asymptotic complexity of the following function and how did you arrive to this answer.

  A tail- recursive auxillary function

Write function choose(int n, int k) using a tail- recursive auxillary function to, compute n choose k without using the factorial function

  Find levels resulting tree have if key compression is used

How many levels would resulting tree have if key compression is used and it decreases the average size of each key in the entry to 10 bytes?

  Create your own function that accepts one input parameter

Using Pseudocode, create your own function that accepts one input parameter and returns a float number. You decide the theme.

  Show schematically a function definition line

Show schematically a function definition line ? And how u would call (execute) the function in a MATLAB program?

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