A sales person gets a base salary of 200 they also get 3


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.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: A sales person gets a base salary of 200 they also get 3
Reference No:- TGS0657476

Now Priced at $30 (50% Discount)

Recommended (94%)

Rated (4.6/5)