Answer to Question #326085 in Algorithms for chanty

Question #326085

JamEx Limited requires a program to calculate and print the commission received by a

salesperson. The program should process an undetermined number of salespersons and

appropriately terminate by a predefined input. The commission rate is based on two factors,

the amount of sales and the class to which a salesperson belongs. The input will be the

salesperson number, sales amount and class. The commission rate will be based on the

following criteria:

Class=1

If sales is equal to or less than $1000, the rate is 6 percent.

If sales is greater than $1000 but less than $2000, the rate is 7 percent.

If the sales is $2000 or greater, the rate is 10 percent.

Class=2

If the sales is less than $1000, the rate is 4 percent.

If the sales is $1000 or greater, the rate is 6 percent.

Class=3

The rate is 4.5 percent for all sales amount

Class=any other value

Output an appropriate error message.


Need answer in pseudocode


1
Expert's answer
2022-04-08T16:05:27-0400
1.  Ask if user want to proccess anothe salesperson
2.  If respose is no go to exit
3.  Ask a class of a salesperson and amount of sales
4.  If class is not equal 1 go to step 12
5.  If the amount less than 1000
6.      Set rate equal 0.06
7.  else if the amount is less than 2000
8.      Set rate equal 0.07
9.  else
10.     Set rate equal 0.1
11. go to step 23
12. If class is not equal 2 go to step 18
13. If the amount less than 1000
14.     Set rate equal 0.04
15. else
16.     Set rate equal 0.06
17. Got to step 23
18. If class equals 3
19.     Set rate equal 0.045
20.     go to step 23
21. Print error message
22. Go to step 1
23. Calculate commission based on rate and sales amount
24. Print result
25. Go to step 1

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS